Unexpected symbol (


#1

var bob = {
firstName: "Bob",
lastName: "Jones",
phoneNumber: "(650) 777-7777",
email: "bob.jones@example.com"
};

var mary = {
firstName: "Mary",
lastName: "Johnson",
phoneNumber: "(650) 888-8888",
email: "mary.johnson@example.com"
};

var contacts = [bob, mary];

function printPerson(person) {
console.log(person.firstName + " " + person.lastName);
}

function list () { var contactsLength = 0
for (i=0,i>contacts.length,i++) {
printPerson(contacts[i])
}
}


#2

Please, review your for loop^

for (statement 1; statement 2; statement 3) {
    code block to be executed
}

#3

Thanks a lot! =]

I figured it out.


#4

Here you need to use Array.length property. Did you pass this lesson?


#5

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