Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript round number to 5 decimal places

var num = 0,19784342446461994;
num = num.toFixed(5); 		// get total 5 number =>  0,19784
num = num.toFixed(6); 		// get total 6 number =>  0,197843
num = num.toFixed(7); 		// get total 7 number =>  0,1978434
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #number #decimal #places
ADD COMMENT
Topic
Name
5+1 =