Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript ternary

## Conditional (ternary) operator
#1 one condition
condition ? ifTrue : ifFalse;
#2 Multi conditions
condition1 ? value1
         : condition2 ? value2
         : condition3 ? value3
         : value4;
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #ternary
ADD COMMENT
Topic
Name
7+4 =