Arithmetic Operators 3
Arithmetic Operators 3
Arithmetic Operators
Basic arithmetic often comes in handy when programming.
An operator is a character that performs a task in our code. JavaScript has several built-
in in arithmetic operators, that allow us to perform mathematical calculations on
numbers. These include the following operators and their corresponding symbols:
1. Add: +
2. Subtract: -
3. Multiply: *
4. Divide: /
5. Remainder: %
The remainder operator, sometimes called modulo, returns the number that remains
after the right-hand number divides into the left-hand number as many times as it
evenly can: 11 % 3equals 2 because 3 fits into 11 three times, leaving 2 as the remainder.