toFixed()

Description :

This method converts the number into string with the specified length of decimals and round off the value.

Syntax :

[number].toFixed(value)

Input Parameters :

value - Optional
The number of digits needs to be considered. Default is "0". If the number is more than the decimal length, then for the extra decimals "0" will be replaced

Return Values :

Returns the converterd Fixed number string.


Test this method :

Test Result :   
Your Code :