I have a snippet of javascript that is behaving quite oddly. It's supposed to be filtering items based on an integer.
It works well in 3 of the 4 ranges that it's supposed to filter on, but fails on the largest of them.
The code:
if ((range_low <= itemLeadtime) && (range_high > itemLeadtime)) {
console.log(range_low +" <= " + itemLeadtime +" && "+ range_high +" > " + itemLeadtime)
...
}
And on the range where it behaves oddly, it logs:
120 <= 40 && 9000 > 40
Why?