Number Object (Windows Scripting - JScript)

 

An object representation of the number data type and placeholder for numeric constants.

Syntax

numObj = new Number(value)

Arguments

  • numobj
    Required. The variable name to which the Number object is assigned.

  • value
    Required. The numeric value of the Number object being created.

Remarks

JScript creates Number objects as required from numerical values. It is rarely necessary to create Number objects explicitly.

The primary purposes for the Number object are to collect its properties into one object, and to allow numbers to be converted into strings via the toString method.

Properties

MAX_VALUE Property | MIN_VALUE Property | NaN Property | NEGATIVE_INFINITY Property | POSITIVE_INFINITY Property | constructor Property | prototype Property

Methods

toExponential Method | toFixed Method | toJSON Method | toLocaleString Method | toPrecision Method | toString Method | valueOf Method

Requirements

Version 1

Change History

Date

History

Reason

August 2008

Added link to toJSON.

Information enhancement.

See Also

Math Object (Windows Scripting - JScript)
new Operator (Windows Scripting - JScript)