Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript ternary

condition ? doThisIfTrue : doThisIfFalse

1 > 2 ? console.log(true) : console.log(false)
// returns false
 
PREVIOUS NEXT
Tagged: #javascript #ternary
ADD COMMENT
Topic
Name
7+1 =