27. Unexpected token = error


#1

I'm not sure what's going wrong in the code below for this exercise. I keep getting an "unexpected token =" error, but I'm not finding any = that shouldn't be there. Could someone take a look and let me know what I messed up?

Thanks!


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

// 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 (var i = 0; i < family.length; i++) {
    console.log(family[i].name);
};


#2

Every time I post a question, I find the answer as soon as I post it! Found the vagrant =. :slight_smile: Thanks anyway!


#3

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