Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript ternary

// example:
age >= 18 ? `wine` : `water`;

// syntax:
// <expression> ? <value-if-true> : <value-if-false>
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #javascript #ternary
ADD COMMENT
Topic
Name
8+8 =