JavaScript tofixado
var int = 10;
var float = parseFloat(int).toFixed(2);
console.log(float); // 10.00
Programming Is Fun
var int = 10;
var float = parseFloat(int).toFixed(2);
console.log(float); // 10.00
var int = 10.147;
var float = parseFloat(int).toFixed(2);
console.log(float); // 10.00