Nearby lessons
13 of 40🔸 Ternary Operator
📌 What is Ternary Operator?
Concise conditional expression.
Shorthand for simple if-else statements.
| Attribute | Description |
|---|---|
condition ? expr1 : expr2 | Returns expr1 if true, expr2 if false |
Code Example
PREVIEW READY
Keep Going!JS - Bitwise Operators