var isArray = function(that){ return (Object.prototype.toString.apply(that) === "[object Array]"); } [...]