Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to make a 2 value after point 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: #point #javascript
ADD COMMENT
Topic
Name
4+4 =