Javascript operators

From wikinotes
Revision as of 00:51, 31 July 2021 by Will (talk | contribs)

and/or

&& ||      // condition AND/OR condition

equality greater/less than

== !=      // equals or not equals
=== !==    // same object instance?
< > <= >=  // greater-than less-than

bitwise operators

x | y      // bitwise or
x ^ y      // bitwise exclusive and
x & y      // bitwise and
x << n     // bitwise shift by n bits
x >> n     // bitwise shift by n bits
~x         // invert bits