7. Search for a friend (Steve not showing up)



Been stuck on this one for a couple of days, was wondering if you could help.


Error: Does not return contact information for Steve

var friends = {
  bill: {
      firstName: "Bill",
      lastName: "Gates",
      number: "555-555-555",
      address: ['One Beaudy','Montreal','Canada','h3l3e4']
  steve: {
      firsName: "Steve",
      lastName: "Jobs",
      number: "666-666-6666",
      address: ['Two Christie Road','Martinez','CA', '90210']

var list = function (friends) {
    for (var friend in friends) {
var search = function (name) {
 for (var key in friends) {
     if(friends[key].firstName === name) {
         return friends[key];

Help please!


When you search, are you searching for "Steve", or "steve"? Be sure to search the proper name, not the property name.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.