Operators
Operators
Section titled “Operators”Introduction
Section titled “Introduction”Operators are symbols that perform operations on values (operands). JavaScript has a rich set of operators that let you do math, compare values, make decisions, and more.
Learning Objectives
Section titled “Learning Objectives”- Use arithmetic, comparison, logical, and assignment operators
- Understand operator precedence and associativity
- Master modern operators: optional chaining and nullish coalescing
Prerequisites
Section titled “Prerequisites”- Understanding of variables and data types
Topics Covered
Section titled “Topics Covered”| Operator Type | Operators |
|---|---|
| Arithmetic | +, -, *, /, %, **, ++, -- |
| Comparison | ===, !==, >, <, >=, <= |
| Logical | &&, ||, ! |
| Assignment | =, +=, -=, *=, /=, %= |
| Ternary | condition ? expr1 : expr2 |
| Nullish Coalescing | ?? |
| Optional Chaining | ?. |
Learning Path
Section titled “Learning Path”Arithmetic → Assignment → Comparison → Logical → Ternary → Nullish Coalescing → Optional ChainingEstimated Learning Time
Section titled “Estimated Learning Time”1–2 hours
Related Topics
Section titled “Related Topics”- Data Types
- Control Flow
- Variables