Operators and Expressions in JavaScript
Operator Description Associativity
() Parentheses Left to right
++ – – Auto increment, decrement Right to left
! Logical NOT Right to left
* / % Multiply, divide, modulus Left to right
+ – Add, subtract Left to right
+ Concatenation Left to right
< <= Less than, less than or equal to Left to right
> >= Greater than, greater than or equal to Left to right
= = != Equal to, not equal to Left to right
= = = != = Identical to (same type), not identical to Left to right
& Bitwise AND Left to right
| Bitwise OR
^ Bitwise XOR
~ Bitwise NOT
<< Bitwise left shift
>> Bitwise right shift
>>> Bitwise zero-filled, right shift
&& Logical AND Left to right
|| Logical OR Left to right
? : Ternary, conditional Right to left
= += – = *= /= %= <<= >>= Assignment Right to left
document.write("Have a Nice Day");
() Parentheses Left to right
++ – – Auto increment, decrement Right to left
! Logical NOT Right to left
* / % Multiply, divide, modulus Left to right
+ – Add, subtract Left to right
+ Concatenation Left to right
< <= Less than, less than or equal to Left to right
> >= Greater than, greater than or equal to Left to right
= = != Equal to, not equal to Left to right
= = = != = Identical to (same type), not identical to Left to right
& Bitwise AND Left to right
| Bitwise OR
^ Bitwise XOR
~ Bitwise NOT
<< Bitwise left shift
>> Bitwise right shift
>>> Bitwise zero-filled, right shift
&& Logical AND Left to right
|| Logical OR Left to right
? : Ternary, conditional Right to left
= += – = *= /= %= <<= >>= Assignment Right to left
document.write("Have a Nice Day");
Comments
Post a Comment