if
Returns the first value if the condition is true; otherwise, returns the second value.
Syntax
if(condition, ifTrue, ifFalse)
if(
1 + 1 == 2,
true,
false
)
if(
/* Check if 1 plus 1 equals 2 */
1 + 1 == 2,
/* If it does, displayed a checked box */
true,
/* Otherwise, display an unchecked box */
false
)