title: Javascript For...In syntax issue?
body: <p>The search function in the following code is not working and I believe it has something to do with the For...In loop but I am new to JS and unsure why:</p>
  
  <pre><code>var friends = {
  bill: {
      firstName: "bill",
      lastName: "smith",
      number: 1,
      address: ["1"]
  },
  steve: {
      firstName: "steve",
      lastName: "smith",
      number: 2,
      address: ["2"]
  }
  };
  
  var list = function(list) {
  for(var item in list) {
      console.log(item);
  }
  };
  
  var search = function(name) {
  
  for(var friend in friends) {
      if(friend.firstName === name) {
          console.log(friend);
          return friend;
      }
  }
  };
  
  search("steve");
  </code></pre>