Could someone please explain this to me?

why is it that properties inside of objects are declared using quotation marks around the name of the property?
var myObject = {
“name”: “thing”,
“wheels”: 4
It seems as though it works the same if there are not quotes around the name of the property
var myObject = {
name: “thing”,
wheels: 4
what is the purpose of the ""s and are they needed in the declaration of objects?

No you don’t need to use quotes. The time you would use quotes is if your keys have a space or special character.
They would be used with

“An-example”: example
“Another example”:example

Otherwise use quotes if your values are strings. Numbers and arrays don’t need quotes

Item: “food”
Number: 4

Thank you very much. :slight_smile: