JS Operator

In JavaScript, we could use a wide range of operators to do different calculation in order to obtain the results we need for our program. In fact, we can use a number of arithmetic operators to do some calculations such as addition, subtraction, multiplication, exponentiation, division, modulus, increment, and decrement as below:

As in Python, in JavaScript, we could also do augmented assignment as below:

We could also use comparison operators to do comparison operation as below:

As for logical operators &&, ||, ! we could use them to do logical operation as below: