Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ternary operator.

print("Equal") if 5==5 else print("Not equal")
5!=5 and 'Equal' or 'Not equal'
Source by www.onlineinterviewquestions.com #
 
PREVIOUS NEXT
Tagged: #ternary
ADD COMMENT
Topic
Name
6+9 =