Is there any way to create an array-like object in JavaScript, without using the built-in array? I\'m specifically concerned with behavior like this:
var sup
You could also create your own length method like:
Array.prototype.mylength = function() { var result = 0; for (var i = 0; i < this.length; i++) { if (this[i] !== undefined) { result++; } } return result; }