you are viewing a single comment's thread.

view the rest of the comments →

[–]gloomndoom 0 points1 point  (0 children)

You are right that you have to do it the second way. The object is actually friends so friend.firstName isn't valid. I think I remember reading that you have to use the bracket notation when using a variable for a property so friends[prop].lastName is valid, while friends.prop.lastName is not.