if (param instanceof Array)
...
Edit. As of 2016, there is a ready-built method that catches more corner cases, Array.isArray
, used as follows:
if (Array.isArray(param))
...
if (param instanceof Array)
...
Edit. As of 2016, there is a ready-built method that catches more corner cases, Array.isArray
, used as follows:
if (Array.isArray(param))
...