How to check if a given variable is an array in Javascript?
There are couple of ways to check if the variable is an array in Javascript
Array.isArray(variableName)
variableName.constructor === Array