var two = 0.2;
var one = 0.1;
var eight = 0.8;
var six = 0.6;
console.log(two - one); // 0.1
console.log(eight - six); // 0.20000000000000007
这是为什么呢。。。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
https://segmentfault.com/q/10...
JS 运算自身bug