Identifying which objects are which is complicated in JavaScript, and figuring out which objects are arrays has something of a hacky solution. Fortunately, it manages to wor
How about checking the constructor?
function inherits(obj, proto) { return obj.constructor === proto.constructor; } inherits(Object.create(Array.prototype), Array.prototype); // true