Skip to content

Operators

machulen edited this page Aug 1, 2017 · 3 revisions

Operators

Arithmetics

op op= meaning
+ += Addition / Unary plus
- -= Subtraction / Unary minus
* *= Multiplication
** **= Exponentiation
/ /= Division
// //= Integer division
% %= Remainder
%% %%= Modulo

Bitwise and logical operators

op op= meaning
and and= Type dependent AND
or or= Type dependent OR
xor xor= Type dependent XOR
not Type dependent NOT
~ Bitwise NOT
! Logical NOT
<< <<= Bitwise left shift
>> >>= Bitwise right shift
>>> >>>= Bitwise unsigned right shift

Comparison

op meaning
< Less
<= Less or equal
> More
>= More or equal
== Strict equal (=== in JS)
!= Strict unequal (!== in JS)
is Strict equal (=== in JS)
isnt Strict unequal (!== in JS)

Words

  • in
  • of
  • instanceof
  • typeof
  • new
  • delete
  • void

Other

op meaning
| Pipe
= Assignment
++ Postfix increment
-- Postfix decrement
, Comma
. Property access
.. Range inclusive
... Range exclusive
? Existence
?= Conditional assignment
?. Conditional property access
:: Prototype
?:: WTF
?:
ternary if else ?:

Questionable

op op= meaning
& &= Bitwise AND
&& &&= Logical AND
| |= Bitwise OR
|| ||= Logical OR
^ ^= Bitwise XOR
^^ ^^= Logical XOR
++a Prefix increment
--a Prefix decrement

Clone this wiki locally