When i am adding the two decimal values using with java script
var first = 0.1;
var second = 0.2;
var tot = parseFloat(firs t) + parseFloat(seco nd);
i am expecting result as : 0.3
But it is giving result as : 0.3000000000000 0004
Please let me know if anyone know the solution.
var first = 0.1;
var second = 0.2;
var tot = parseFloat(firs t) + parseFloat(seco nd);
i am expecting result as : 0.3
But it is giving result as : 0.3000000000000 0004
Please let me know if anyone know the solution.
Comment