JavaScript Math Object

The JavaScript Math object allows you to perform mathematical tasks on numbers.

Example

Math.PI;

The Math Object

Unlike other objects, the Math object has no constructor.

The Math object is static.

All methods and properties can be used without creating a Math object first. Continue reading JavaScript Math Object

JavaScript Arithmetic

JavaScript Arithmetic Operators

Arithmetic operators perform arithmetic on numbers (literals or variables).

Operator Description
+ Addition
Subtraction
* Multiplication
** Exponentiation (ES2016)
/ Division
% Modulus (Remainder)
++ Increment
Decrement

Continue reading JavaScript Arithmetic