operator ternary javascript ?: code example
Example 1: js ternary
condition ? ifTrue : ifFalse
Example 2: ternary operator if javascript
condition ? exprIfTrue : exprIfFalse
condition ? ifTrue : ifFalse
condition ? exprIfTrue : exprIfFalse