27/33 Code not logging to console


I get the error message "Oops, try again. Make sure to log to the console the name of each object."
I'm not sure what I'm doing wrong (duh)

function Person (name, age) {
    this.name = name;
    this.age = age;
}// Our Person constructor

// Now we can make an array of people
var family = new Array();
family[0] = new Person("alice", 40);
family[1] = new Person("bob", 42);
family[2] = new Person("michelle", 8);
family[3] = new Person("timmy", 6);

// loop through our new array
for(i=0,i < family.length; i++;){


Found it!

What's a comma doing in the for loop?

Hope this solves your problem!


Also you put a semicolon after your i++.

...And don't forget to "mark as solution" any post that fixes your problem. It helps other people with the same problem learn how to fix it.


Thank you very much! :relaxed:


You're very welcome :slight_smile:


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