Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

two decimel javascript

var num1 = parseFloat("10.547892")
var num2 = parseFloat("10.547892").toFixed(2)
console.log("Without using toFixed() method");
console.log(num1);
//10.547892
console.log("Using toFixed() method");
console.log(num2);
//10.55
 
PREVIOUS NEXT
Tagged: #decimel #javascript
ADD COMMENT
Topic
Name
4+9 =