/* * SoloLearn.com - Challenge * JavaScript * by Kartikey Sahu */ let sum = 0.1 + 0.2; console.log( +sum.toFixed(2) ); //----------------------------- a = sum.toFixed(2); b = +sum.toFixed(2); console.log(a, typeof a, b, typeof b);
0.3 0.30 string 0.3 number