Number.toFixed
toFixed — Returns a string representation of the specified Number object.
Description
Number.toFixed([integer decimals])
Parameters
Name | Description | Type | Default | Optional |
---|---|---|---|---|
decimals | A number between 0 and 20 representing number of digits. | integer | 0 | Yes |
Examples
Example #1 – toFixed example