The functionality of this code in Chrome 59.0.3071.115 is causing confusion for me:
var names = ["Cat 1", "Cat 2"];
console.log(names);
When executed, it displays an array object; however,
var name = ["Cat 1", "Cat 2"];
console.log(name);
Instead prints the string "Cat 1, Cat 2"
.
I am trying to understand why there is a discrepancy between the two outcomes.