List 'Em All!


Hi, I'm getting this error when trying to log the firstnames of my list.

"Error: Did you create a function called list?"

Could someone help? Thanks.

var friends = Object();

friends.steve = {
    firstName: "Steve",
    lastName: "Smith",
    number: 777,
    address: ["2","far"],
friends.jayjay = {
    lastName: "Dean",
    number: 333,
    address: ["3", "imaginary road"],

friends.bill = {
    firstName: "Bill",
    lastName: "Baggins",
    number: 222,
    address: ["4","boring road"],
var list = function (friends) {
    for (var key in object) {


Ho this

for (var key in object)

line It should be key in friends


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