Web features explorer

Math and numbers

Widely available
Tags: javascript Groups: JavaScript > Primitive types

The number type (and Number object) represents floating-point numbers, such as 42 or -4.201, while the Math API contains mathematical functions and constants. JavaScript can also represent boundless negative and positive values as Infinity or not-a-number as NaN (as in 0 * Infinity). To learn more, see Number at MDN.

Compatibility

Specifications