var int = 10;
var float = parseFloat(int).toFixed(2);
console.log(float); // 10.00
var a = 3.3445;
var c = a.toFixed(1); console.log(c); /* result ->*/ 3.3
var g = a.toFixed(4); console.log(g); /* result ->*/ 3.3445
var g = a.toFixed(7); console.log(g); /* result ->*/ 3.3445000
// ^ ^^^^^^^
/*Syntax ->*/ number.toFixed([digits])
// like Me ;D . My company : Rnad
var val = (parseFloat('2.3') + parseFloat('2.4')).toFixed(2)
//if you are adding dynamic values then use following example
var a = 2.3;
var b = 2.4;
var val = (parseFloat(a)+parseFloat(b)).toFixed(2);
var v1 = "1151.00";
v1 = v1.substring(0, v1.length - 1);
console.log(v1);
console.log(parseFloat(v1).toFixed(1));