toExponential ( fractionDigits: Number ) { String }

The toExponential() method returns a string representing the Number object in exponential notation.

Parameters
Name Type Description
fractionDigits Number

Optional. An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.

Returns

A string representing the given Number object in exponential notation with one digit before the decimal point, rounded to fractionDigits digits after the decimal point.

toFixed ( digits: Number ) { String }

The toFixed() method formats a number using fixed-point notation.

Parameters
Name Type Description
digits Number

The number of digits to appear after the decimal point; this may be a value between 0 and 20, inclusive, and implementations may optionally support a larger range of values. If this argument is omitted, it is treated as 0.

Returns

A string representing the given number using fixed-point notation.

toLocaleString ( locales: String ) { String }

The toLocaleString() method returns a string with a language-sensitive representation of this number.

Parameters
Name Type Description
locales String

A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the locales argument, see the Intl page

Returns

A string with a language-sensitive representation of the given number.

toPrecision ( precision: Number ) { String }

The toPrecision() method returns a string representing the Number object to the specified precision.

Parameters
Name Type Description
precision Number

An integer specifying the number of significant digits.

Returns

A string representing a Number object in fixed-point or exponential notation rounded to precision significant digits. See the discussion of rounding in the description of the Number.prototype.toFixed() method, which also applies to toPrecision().

toSource ( ) { String }

The toSource() method returns a string representing the source code of the object.

Returns

A string representing the source code of the object.

toString ( radix: Number ) { String }

The toString() method returns a string representing the specified Number object.

Parameters
Name Type Description
radix Number

Optional. An integer in the range 2 through 36 specifying the base to use for representing numeric values.

Returns

A string representing the specified Number object.

valueOf ( ) { Number }

The valueOf() method returns the wrapped primitive value of a Number object.

Returns

A number representing the primitive value of the specified Number object.