6. List 'em all! > Oops, try again. There was a problem with your syntax


#1


It keep saying Oops, try again. There was a problem with your syntax. i already check it in abot:blank page but sometimes i HATE JS doesnt help when your starting and getting those error and never tells you what wrong just mark the line and its wrong just guess it :slight_smile:


var friends = {
    bill: {
    firstName: 'Bill',
    lastName: 'Gates',
    number: '(206) 555-5555',
    address: ['One Microsoft Way', 'Redmond','WA','98052']
    },
    steve: {
    firstName: 'Steve',
    lastName: 'Jobs',
    number: '(602) 777-7777',
    address: ['One Apple Way', 'Daimond','WN','50296']
    },
    function list(name) {
        for (var name in object) {
            console.log(name);    
        }    
    }
    
};


#2

the list function should be after you declared your friends object


#3

Thank you, but already figured out before raging like a boss and smashed my head into the monitor i did it, i think this is how normal people learn js... i guess...


#4

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