Error on family loop


#1

function person(name,age) {
this.name = name;
this.age= age;
};
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);

    for (var i=0, i< family.length, i++) {
        console.log(family[i].name);
    
        };
   SyntaxError: missing  after for-loop initializer

can someone tell me whats wrong


#2

You have commas you need semi colons
(var i=0; i < family.length; i++)


#3

thank you that worked