what does the conditional operator ?: do code example
Example 1: conditional operator
var age = 26;
var beverage = (age >= 21) ? "Beer" : "Juice";
console.log(beverage); // "Beer"
Example 2: Conditional operator
bCondition1 && bCondition2
var age = 26;
var beverage = (age >= 21) ? "Beer" : "Juice";
console.log(beverage); // "Beer"
bCondition1 && bCondition2