console.log(typeof(parseInt((0.1 + 0.2).toFixed(1)))); // number
console.log((0.1 + 0.2).toFixed(1) == 0.3); // true
console.log((parseInt((0.1 + 0.2).toFixed(1))) === 0.3); // falseRun Code Online (Sandbox Code Playgroud)
有人可以解释为什么最后一个语句不返回 true 吗?
javascript ×1