I would like to know how I can identify whether or not an object is a array
in Javascript.
I know that in jQuery there is the $.isArray
function. But I'd like to learn to do this without jQuery
.
I tried typeof
and did not return the expected result.
Example:
typeof([]) // "object"