JavaScript » Operators » Arithmetic

JavaScript contains the standard arithmetic operators plus ones for modulus, increment, decrement and unary negation.

%

This is the modulus operator which returns the integer remainder of dividing the preceding operand by the one following it.

*

This is the standard multiplication operator and it returns the product of two numerical values (either literals or variables).

+

This is the standard addition operator and returns the sum of two numerical values (either literals or variables).

++

This is the increment operator and is used to increment (add one to) its operand.

-

This is the standard subtraction operator and it subtracts one number from another.

--

This is the decrement operator which decrements (deducts one from) its operand.

/

This is the standard division operator which divides one number by another.