Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ternary operator js

condition ? expression1 : expression2 
// Will return expression1 if condition = true and expression2 if condition != true
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #ternary #operator #js
ADD COMMENT
Topic
Name
9+1 =