JavaScript Operators
JavaScript has 7 types of operators:
- Arithmetic Operators
- Assignment Operators
- Bitwise Operators
- Comparison Operators
- Logical Operators
- Special Operators
- String Operators
Some operators take precedence over others in evaluations. For a complete list of operators and their order of precedence, see the Order of Precedence.
JavaScript has unary, binary, and one ternary operator (the conditional operator).
Each unary operator consists of one operand, either before or after the operator, e.g. y++ or ++z.
Each binary operator comprises one operand, the operator, then a second operand, e.g. a+b or 1+2.
The ternary operator (the conditional operator) has three operands.
