JS Operators
%
Modulus operator, 9%2 = 1
+=
e.g. x=10; x += 7; Now x= x + 7 =17
-=
e.g. x=10; x -= 7; Now x= x - 7 =3
*=
e.g. x=10; x *= 7; Now x= x * 7 =70
/=
e.g. x=14; x %= 7; Now x= x % 7 =2
%=
e.g. x=10; x %= 7; Now x= x % 7 =3
<
Comparison operator,Less than
>
Comparison operator,Greater than
<=
Comparison operator,Less than or equal to
>=
Comparison operator,Greater than or equal to
!=
Comparison operator,Not equal to
==
Comparison operator, equal
===
Comparison operator, identical type and value
!==
Comparison operator, not identical
n++
Increment, return original value. e.g. i=2;x=i++; Now x=2, i=3
++n
Increment, return incremented value. i=2;x=++i; Now x=3, i=3
n--
decrement, return original value. e.g. i=2;x=i--; Now x=2, i=1
--n
decrement, return decremented value. i=2;x=--i; Now x=1, i=1
>>
Bitwise operator, 20>>3=2
<<
Bitwise operator, 20<<3=160
>>>
Bitwise operator, 2>>>3=2
&=
Bitwise operator, e.g. x=2; x&=3 = x&3=2
|=
Bitwise operator, e.g. x=20; x|=3; Now x=x|3=23
^=
Bitwise operator, e.g. x=2; x^=3=x^3=1
>>=
Bitwise operator, e.g. x=20; x>>=3 =x>>3=2
<<=
Bitwise operator, e.g. x=20; x<<=3=x<<3=160
>>>=
Bitwise operator, e.g. x=2; x>>>=3=x>>>3=2