Contact List (Solved)


#1


I need to print all the first names in the tables, but I get an error saying that it doesn't print the right output, which is 'Bill' and 'Steve'.

(The output prints Bill and Steve)

EDIT: Nevermind, it was case sensitive.


var friends = {
    bill: {
        firstName: 'Bill',
        lastName: 'Gates',
        number: '331-244-7538',
        address: ['1 Microsoft Rd.', 'Toronto', 'ON', 'K4P N3L']
        },
    steve: {
        firstName: 'Steve',
        lastName: 'Pup',
        number: '348-284-1938',
        address: ['123 Test St.', 'Toronto', 'ON', 'N5L K4P']
        }
};

function list(listo){
  for(var name in friends)
  console.log(friends[name].firstName)
}


#2

Issue solved by self


#3

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