By Greg Ferrell » January 10, 2009
In JavaScript the typeof operator reports an array as 'object'. While this is technically correct (an array in JavaScript is really just a specialized object), it's a pain in the neck when you are type checking a variable.
There are a number of ways to identify an array in JavaScript. Checking for properties of an array isn't totally accurate because you can add any named member to an object to imitate an array. Checking for 'instanceof Array' works most of the time but could be tricky in some implementations of JavaScript.

