I'm sorry I know there a lot of questions regarding this excercise and the previous one but I just can't seem to fully understand this concept. I tried to do it by myself and passed the excercise number 6 with some of the help found here but then i moved to this excercise and I'm lost again. I copied the code from the first excercise to see if something made sense to me but it was uselesss.

I just don't get why the list and the search function work it seems so random. Why console.log(x) list the names of the objects bill and steve but in search we do console.log(friends[prop]? shouldn't it be console.log(friends[x])?

I guess the question is very vague but could someone explain me what "x" and "prop" translates to? Also I've seen that everyone in this forum made the objects with curly braces instead of new Object(); would that help me?

Again sorry for asking the same question and if my english wasn't perfect.

If x were the iterator variable, yes; but this time the author chose to use prop instead of x for that variable. It's strictly arbitrary what name we use for the variable. It can be anything, though it helps if it is meaningful.

for (var key in obj) { console.log(key); // bill}we are grabbing the key for the only propertie that friends has, right? why doesn't it grabs the key for Bill or for any other object that we may have in our code?. What if i had another element similar to "friends" that was called "enemies" how would the function know that i want the friends keys and not the enemies's.