Number()

JavaScript 1.1+, JScript 1.0+ Nav3+, NES2+, IE 3+, Opera3+ Syntax

var variable = new Number(value)

Description

The Number object represents numeric value types. You can create a Number object by specifying a value in the parameter for the number constructor. Table 6.29 shows the different methods and properties of the Number object.

Table 6.29. Properties and Methods of the Number Object
Property/Method Description
MAX_VALUE Specifies the largest value a number can have.
MIN_VALUE Specifies the smallest value a number can have without being equal to 0.
NaN Stands for Not a Number. Represents a value that is not equal to any numeric value.
NEGATIVE_INFINITY A special value that represents a negative infinity value.
POSITIVE_INFINITY ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.