JavaScript Operators List

The following JavaScript operators reference, lists JavaScript operators by their order of precedence. First operator in the list has higher precedence as compared to the operator listed next in the list.

The third column of the table represents the Operator Associativity (or Order of Evaluation) it can be from Right-to-Left or Left-to-Right.

Operator Operation Operator Associativity
++ Pre- or post-increment Right-to-Left
-- Pre- or post-decrement Right-to-Left
- Negate number Right-to-Left
+ Convert to number Right-to-Left
~ Invert bits Right-to-Left
! Invert boolean value Right-to-Left
delete Remove a property Right-to-Left
typeof Determine type of operand Right-to-Left
void Return undefined value Right-to-Left
** Exponentiate Right-to-Left
*, /, % Multiply, divide, remainder Left-to-Right
+, - Add, subtract Left-to-Right
+ Concatenate strings Left-to-Right
<< Shift left Left-to-Right
>> Shift right with sign extension Left-to-Right
>>> Shift right with zero extension Left-to-Right
<,<=,>,>= Compare in numeric order Left-to-Right
instanceof Test object class Left-to-Right
in Test whether property exists Left-to-Right
== Test for non-strict equality Left-to-Right
!= Test for non-strict inequality Left-to-Right
=== Test for strict equality Left-to-Right
!== Test for strict inequality Left-to-Right
& Compute bitwise AND Left-to-Right
^ Compute bitwise XOR Left-to-Right
| Compute bitwise OR Left-to-Right
&& Compute logical AND Left-to-Right
|| Compute logical OR Left-to-Right
?? Choose 1st defined operand Left-to-Right
?: Choose 2nd or 3rd operand Right-to-Left
= Assign to a variable or property Right-to-Left
**=, *=, /=, %=,+=, -=, &=, ^=, |=,>=, >>>= Operate and assign Right-to-Left
' Discard 1st operand, return 2nd Left-to-Right