6 List em all


#1

var friends = {}
friends.sandra = {
firstName: 'Sandra',
lastName: 'Joseph',
number: '(342) 335-5678',
address: ['Random way ','Randomville','Random']

};
friends.sonia = {
    firstName: 'Sonia',
    lastName: 'Sabu',
    number: '(563) 243-9456',
    address: ['Somewhereway','Somewhereville','Somewhere']
};

var list = function(friends){
for (var friend in friends) {
console.log(sandra);

};}

// I tried inputting this and it came up with " Did you create a function called 'list'?" Correct me


#2

actually i got it

if anyone was wondering it was

var list = function(friends) {
for (var friend in friends) {
console.log(sandra) //<-- i had to change 'sandra' to 'friend'

var list = function(friends) {
for (var friend in friends) {
console.log(friend)


#3

Thanks, that was quite a confusing one.


#4

Thanks, I swear I tried everything to get this to work, but that one little tweak made mine work, too.