I have a problem which I think is a bug. So I have created a for loop:
var multi=2;
for (limit=0; limit < length; limit += 1.2) {
multi++;
}
console.log(multi);
The output is correct for all range of values except for the instance where length=10.8 or any multiples thereof. The output shows as multi=12 which in fact it should be 11.
Can somebody tell me why is this happening?
Thanks!