Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript number format

var x = parseFloat('9.656');

x.toFixed(0);           // returns 10
x.toFixed(2);           // returns 9.66
x.toFixed(4);           // returns 9.6560
x.toFixed(6);  
 
PREVIOUS NEXT
Tagged: #javascript #number #format
ADD COMMENT
Topic
Name
7+6 =