Am I summarizing this lesson the right way?

The way I understand this in my own words is that,
When the value of a variable that is the same as the property of an object, that variable becomes synonymous with the property of the object as well and can be referenced to it using dot or bracket notation.

it’s not a synonim, it’s just a string - but if it has the value of an object property name then it can be used to access that object property value

also, dot notation will acess exactly what you have written, it doesn’t work with variables

obj.myVar is not the same as obj[myVar]

obj.myVar is the same as obj["myVar"]

1 Like