10. List all the properties


#1

why this nyc.key does not work?

but nyc[key] can ?


#2

you never set your key = to anything
it should be var key = to any one of rthe properties such as "fullName"
Like so


hope this helps


#3

Square bracket notation allows access to properties containing special characters and selection of properties using variables.Dot notation can't use variable.
In this statement ,for(var key in nyc){} ,"key" is a variable.
See this:
JavaScript property access: dot notation vs. brackets?