September 2015
Intermediate to advanced
92 pages
1h 30m
English
CHAPTER 3
![]()
Operators
An operator is a symbol that makes the script perform a specific mathematical or logical manipulation. The operators in JavaScript can be grouped into five types: arithmetic, assignment, comparison, logical, and bitwise operators.
Arithmetic Operators
The arithmetic operators include the four basic arithmetic operations, as well as the modulus operator (%) that is used to obtain the division remainder.
x = 3 + 2; // 5 - additionx = 3 - 2; // 1 - subtractionx = 3 * 2; // 6 - multiplicationx = 3 / 2; // 1.5 - divisionx = 3 % 2; // 1 - modulus (division remainder)
Assignment Operators
The second group is the assignment operators. ...
Read now
Unlock full access