Detect if parameter passed is an array? Javascript.

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-05-04T05:36:02Z Indexed on 2010/05/04 5:48 UTC
Read the original article Hit count: 180

Hello all,

I have a simple question:

How do I detect if a parameter passed to my javascript function is an array? I don't believe that I can test:

if (typeof paramThatCouldBeArray == 'array') 

So is it possible?

How would I do it?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about arrays