Alright, so nothing fancy here, just some JSON:
var a = ["foo", "bar", "baz"];
var o = {a: "foo", b: "bar", c: "baz"};
But what happens when we do this?
typeof a; // => "object"
I’d like it if I could just get that command to say “array”. But I can’t. Is there any way to differentiate?
You can check if the object is an instance of
Array: