Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

toFixed in Javascript

var v1 = "1151.00";
v1 = v1.substring(0, v1.length - 1);
console.log(v1);
console.log(parseFloat(v1).toFixed(1));
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #toFixed #Javascript
ADD COMMENT
Topic
Name
8+5 =