因为进制的关系,会遇到下面这样的问题:console.log(0.1+0.2==0.3);输出结果为false所以需要用toFixed()方法去处理一下才能使等式成立:console.log((0.1+0.2).toFixed(1)==0.3);输出结果为true