2.1.17 [ECMA-262-1999] Section 9.3, ToNumber

V0028:

The operator ToNumber converts its argument to a value of type Number according to the following table:

Input Type

Result

Undefined

NaN

Null

+0

Boolean

The result is 1 if the argument is true. The result is +0 if the argument is false.

Number

The result equals the input argument (no conversion).

String

See grammar and note below.

__SafeArray__

__Throw a TypeError exception.__

__VarDate__

__The result is the Number that represents the internal numerical value of the VT Date value.__

Object

Apply the following steps:

1. Call ToPrimitive(input argument, hint Number).

2. Call ToNumber(Result(1)).

3. Return Result(2).