Check if type of value is an Array
You want to check if a value is an
typeof operator gives a faulty output for arrays.
Use the following code:
To use this, just call
typeIsArray as such:
The method above has been adopted from “the Miller Device”. An alternative is to use Douglas Crockford’s snippet: