For-loop performance: storing array length in a variable
The accepted answer is not right because any decent engine should be able to hoist the property load out of the loop with so simple loop bodies. See this jsperf – at least in V8 it is interesting to see how actually storing it in a variable changes the register allocation – in the code …