RSSAmplifier

Brian Wigginton · Sep 29, 2013

Array-like objects in JavaScript

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

I learned something interesting in John Resig’s book Secrets of the JavaScript Ninja. How could you add Array like properties to your objects? At first thought, or at least my first thought, I would add an array to the object and then just use it internally as a collection, or maybe set the prototype to Array.prototype. However, John points out a much simpler way. You can simply use Array’s…

Read on /2013/09/array-like-objects-in-javascript/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.