Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Use the Conditional (Ternary) Operator

function checkEqual(a, b)
{
return a === b ? “Equal” : “Not Equal” ;
}
checkEqual(1, 2);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Use #Conditional #Operator
ADD COMMENT
Topic
Name
7+8 =