var x = ["abc", 123]; var y = typeof x; console.log(y); I was expecting the output "array" but it resulted as an object. How come array be an object ?