Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Rounding off to desired no of digit after decimal

(6.688689).toFixed(); // equal to "7"
(6.688689).toFixed(1); // equal to "6.7"
(6.688689).toFixed(2); // equal to "6.69"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Rounding #desired #digit #decimal
ADD COMMENT
Topic
Name
8+7 =