JavaScript Tutorial
JS Operators
Types of Operators
- Arithmetic: +, -, *, /, %
- Assignment: =, +=, -=, *=, /=
- Comparison: ==, ===, !=, !==, <, >, <=, >=
- Logical: &&, ||, !
Operator Precedence
Precedence determines the order in which operators are evaluated. Use parentheses to override.
Examples
1 + 2 * 3 // 7 (1 + 2) * 3 // 9 x += 5 // x = x + 5 true && false // false