In the lesson on “Updating Object Properties”, this example is given:
var ourDog = {
"name": "Camper",
"legs": 4,
"tails": 1,
"friends": ["everything!"]
};
Why is “everything!” in brackets? I thought you would only put arrays in brackets when listing them as an object property, but this is only one word. Is there a concern with putting the !
in quotes?