小程序-if 判断不准确

2018-12-26  本文已影响11人  大功率台灯

我想问一下 小程序里面
if (max > Inductance > min) {
console.log('Inductance_max', max, Inductance, min)
temArray.push(temObj)
}
max = 1.4 inductance=0.56 min = 0.8
为什么可以到if里面去!!!???
why?

首先,这里要先说明的是,从log的内容来看,是没有错的。
这里出错了,怎么解决呢

parseFloat转换max Inductance min 再做这个比较就可以了

上一篇 下一篇

猜你喜欢

热点阅读