ternary operator ! javascript code example
Example 1: single if statement js true false
condition ? exprIfTrue : exprIfFalse
Example 2: javascript ternary
condition ? doThisIfTrue : doThisIfFalse
1 > 2 ? console.log(true) : console.log(false)
// returns false