Why does JS allow object properties to be both "quoted"
and non-quoted
? Is there a difference?
var object = {
"firstName": "SpongeBob", //quoted
lastName: "SquarePants" //non-quoted
};
console.log(object.firstName); // -> SpongeBob
console.log(object.lastName); // -> SquarePants