kaniosrn-j
8/9/2018 - 10:53 AM

Detect if parameter passed is an array

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))
...