PERFORMANCE TEST: Array Iteration Styles
SOURCE

This test page demonstrates that using the more concise for...in iterator style for iterating through simple arrays is vastly less efficient than the traditional approach of incrementing a counter from 0 to one less than the length of the array.

In the test, an array containing 500,000 elements is iterated using the traditional approach versus the for...in approach. There is no additional code being performed by the iterators, so the cost is purely for the iteration itself.