Answers for "int to float with two decimals javascript"

3

javascript int to float

var int = 10;
var float = parseFloat(int).toFixed(2);
console.log(float); // 10.00
var threedots = 8;
var float2 = parseFloat(threedots).toFixed(3);
console.log(float2); // 8.000
Posted by: Guest on June-19-2021
3

js how to work with float 2 decimal numbers

Math.round(num * 100) / 100
Posted by: Guest on March-17-2021

Code answers related to "int to float with two decimals javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language