I would like to clarify something. When it comes to accessing properties through a loop, how is come it isn’t corrent to use a counter variable in a chain of nested objects?
I’m referring to https://www.freecodecamp.com/challenges/profile-lookup challenge with the nested objects.
From the previous lessons it was stated that there was a choice of using
ourStorage.cabinet["top drawer"].folder2; or
in the https://www.freecodecamp.com/challenges/accessing-nested-objects example.
So I was wondering why
contacts.i.firstname wasn’t an acceptable answer in the challenge.
Are there any other defined uses of these characters, notations and variables that I may be missing out?
I hope you understand what I’m talking about. I’d appreciate anything that will help me out of this confusion.
Thank you very much!