Software Sue

Link to Simply Sue
Link to Sustainability Sue
location: software/scripting/javascript/order of precedence Skip navigation : Home  

JavaScript Order of Precedence


Precedence refers to the order in which operators are applied when evaluating an expression. Operator precedence can be overridden by using parentheses. The following list gives the order of precedence, starting with the highest.

The following table describes the precedence of operators, from highest to lowest.

 

Operator type

Individual operators

highest:member . []
 create instance new
 call ()
 negation/increment ! ~ - + ++ -- typeof void delete
 multiply/divide * / %
 addition/subtraction + -
 bitwise shift << >> >>>
 relational < <= > >=
 equality == !=
 bitwise-and &
 bitwise-xor ^
 bitwise-or |
 logical-and &&
 logical-or ||
 conditional ?:
 assignment = += -= *= /= %= <<= >>= >>>= &= ^= |=
lowest:comma ,