10. List all the properties


why this nyc.key does not work?

but nyc[key] can ?


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


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?