Archive for January, 2011

 

Iterating Enumerable Objects

You cannot undervalue the cost-benefit of iteration, despite being such a simple construct, it is a frequently used process fundamental to any framework. For these reasons, we want to maximize the efficiency and effectiveness of the routine by leveraging native implementations where they are available. This is an important concept for all enumerable objects, not just arrays but also array-like objects such as nodelists and arguments. By harnessing the capabilities of the native environment we can utilize the improved performance and reliability inherent to the JavaScript engine.