what are conditional statements in javascript code example
Example 1: javascript conditional
// example:
age >= 18 ? `wine` : `water`;
// syntax:
// <expression> ? <value-if-true> : <value-if-false>
Example 2: how to shorten conditional statements javascript
var canDrive = age > 16 ? 'yes' : 'no'