[Record Collection challenge] Question about dot notation

In this challenge, if I write: object.prop = value, then the object will be:
Screenshot 2021-03-07 115808

BUT if I write: object[prop] = value;, then:
Screenshot 2021-03-07 115915

Why?

dot notation uses exactly what you write, you can’t use it with variables, also note that you need to edit the nested objects

1 Like