I wrote this beat
console.log(1.2 * 3);
But the answer is 3.5999999999999996
I use console.log((1.2 * 3).toFixed(2)). And it was done But what is the reason for this bug?
I wrote this beat
console.log(1.2 * 3);
But the answer is 3.5999999999999996
I use console.log((1.2 * 3).toFixed(2)). And it was done But what is the reason for this bug?