sstephenson/prototype — comment on commit 460be4691af9e4e92908c9ac707597bad69be57c
File: src/prototype/lang/array.js line 517
By keithamus:

And for the purposes of this piece of code, you may as well use `for (var i = 0, length = +object.length; i < length; i++) {`, because the loop will break out if length is anything but a number of 0 (that'll be the `i < length;` bit). E.g `0 < -1` is false, `0 < NaN` or `0 < +undefined` is false, and so on. The exception being `Infinity`, but a length of -1 is probably more likely than a length of `Infinity`