6/8 Contact List


#1

I keep getting the syntax error, "Unexpected token var"! I tried using different code, found the exact YouTube to walk me through step by step and yet I'm still confused. I'm sure it's something silly like a punctuation error or something small. However I can't spot it. Please be kind enough as to help me, because I'm losing my mind!

var friends = new Object();
var friends = {
steve: {
firstName:"Steve",
lastName:"Cobain",
number:"281-830-8004",
address: ['9669 Stupid Lane','Fresco','WY','17038']
},
bill: {
firstName:"Bill",
lastName:"Bellichekk",
number:"911-219-5983",
address: ['504 Louisiana Ave','Baton Rouge','LA','11019']
},
Matthew: {
firstName:"Mathew",
lastName:"Clemente",
number:"614-197-2246",
address: ['28 146th Street','New York','NY','10812']
},
Jessica: {
firstName:"Jessica",
lastName:"Baker",
number:"614-908-8852",
address: ['90210 Beverly Hills Drive','Anaheim','CA','98052']
}
var list = function(parametr) {
for (var key in parametr)
{
console.log(key);
}
}
list(friends);
};


#2

You didnt close the object

address: ['90210 Beverly Hills Drive','Anaheim','CA','98052']
}
} // this is missing
var list = function(parametr) {