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
it functions like an array, and for all purposes, it is an array
No. It has no auto-updating length property. See this article why it's quite impossible to subclass Array.
Is there any way to figure out if an object inherits from a particular prototype? I suppose you could iterate through the prototypes, but it feels a tad hacky.
That's just how to do it. A cleaner approach than a self-written function would be to use the instanceof operator:
arr instanceof Array; // true