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
See http://perfectionkills.com/how-ecmascript-5-still-does-not-allow-to-subclass-an-array/ for the definitive exposition of the problems in inheriting from Array.
Anyway, in the simplest case, where you are doing
var sort_of_an_array = Object.create(Array.prototype);
you can check using isPrototypeOf
:
Array.prototype.isPrototypeOf(sort_of_an_array)
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf.