Operators |
Previous Top Next |

**Operators in Javascript**

__Arithmetic__

+ |
addition |

- |
subtraction |

++ |
increment |

-- |
decrement |

* |
multiply |

/ |
divide |

% |
modulus |

__String__

+ |
concatenate |

+= |
append |

__Logical__

&& |
AND |

|| |
OR |

! |
NOT |

__Bitwise__

& |
bitwise AND |

^ |
bitwise XOR |

| |
bitwise OR |

~ |
bitwise NOT |

<< |
bitwise LEFT SHIFT |

>> |
bitwise RIGHT SHIFT |

__Assignment__

= |
n = 2 |

+= |
n = n+x |

-= |
n = n-x |

*= |
n = n*x |

/= |
n = n/x |

%- |
n = n%x |

&= |
n = n&x |

^= |
n = n^x |

|= |
n = n|x |

<<= |
n = n<<x |

>>= |
n = n>>x |

__Comparison__

== |
is equal to |

!= |
is NOT equal to |

> |
is greater than |

>= |
is greater than or equal |

< |
is less than |

<= |
is less than or equal to |