0
How make code rounding of value 2.46666666666 to 2.47 ? đ
3 RĂ©ponses
+ 5
You can use the toFixed() method
console.log((1/3).toFixed(2))
If you want to find it out yourself and not having to wait for others' responses, consider googling "Javascript round to 2 decimals" or something like that
+ 4
var n = 2.4666666666
console.log(n.toFixed(2))
//2.47
0
Thanks for help me Lisa & SomeAwesome good solutions đ