number()

The number object is used to represent a numeric value, with both numeric and floating point values being represented. A numeric value automatically becomes an instance of the number() object. Declaring a new number object is frightfully simple, as the syntax and example shows.

syntax:

var variableName = new Number(number)

EXAMPLE

var productCount = new Number(56);

The example shows a new variable, 'productCount', which has been filled with the Number '56'. Simple.

The Properties of the number Object are:

• MAX_VALUE

• MIN_VALUE

• NaN

• NEGATIVE_INFINITY

• POSITIVE_INFINITY

• prototype

The Methods of the number Object are:

• toString()

• valueOf()