var a ='19'
undefined
var b = '18.51'
undefined
parseFloat(a) -parseFloat(b)
0.48999999999999844
a -b
0.48999999999999844
19 - 18.51
0.48999999999999844
a
"19"
b
"18.51"
Number(19)-Number(18.51)
0.48999999999999844
为什么不是0.49呢
19-18.51
0.48999999999999844
19-0.51
18.49
19-1.51
17.49
19-5.51
13.49
19-17.51
1.4899999999999984
19-13.51
5.49
有的又是可以计算出来的
把浮点数转化成整数再运算