Web features explorer

Math and numbers

Widely available since 2018-01-29
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).

Learning resources on MDN

Browser support

Specifications