Interface Number
toExponential(fractionDigits?: number): string;
toFixed(fractionDigits?: number): string;
toLocaleString(locales?: string | string[], options?: NumberFormatOptions): string;
toLocaleString(locales?: LocalesArgument, options?: NumberFormatOptions): string;
toPrecision(precision?: number): string;
toString(radix?: number): string;
valueOf(): number;
}
Index
Methods
toExponential
toFixed
toLocaleString
- to
Locale (locales?, options?): stringString Converts a number to a string by using the current or specified locale.
Parameters
Optional
locales: string | string[]A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: NumberFormatOptionsAn object that contains one or more properties that specify comparison options.
Returns string
- to
Locale (locales?, options?): stringString Converts a number to a string by using the current or specified locale.
Parameters
Optional
locales: LocalesArgumentA locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: NumberFormatOptionsAn object that contains one or more properties that specify comparison options.
Returns string
Returns a string containing a number represented in exponential notation.