Represents a signed IEEE 64-bit (8-byte) double-precision floating-point number ranging in value from -1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values and from 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values.
Constructors
Number ( )
Initializes a new Number instance with a value of 0 (zero). This has the same affect as using a numeric literal with a value of zero.
Syntax:Number()
Example:
i = new Number( ); // results in 0
// is equivalent to
i = 0;
Initializes a new Number instance to the specified number value.
Syntax:Parameters:Example:
i = new Number( 5.25 );
// is equivalant to
i = 5.25;
Initializes a new Number instance by converting the specified string to a number.
Syntax:Parameters:Example:
s = "5.25";
i = new Number( s );
Initializes a new Number instance by converting a boolean to a number.
false results in 0 (zero), and
true results in 1.
Syntax:Parameters:Example:
b = true;
i = new Number( b ); // results in 1
Instance Methods