27 - Syntax Error: Unexpected token =


#1

Hi guys, been a while since I've tried my hand at JavaScript. I seem to be stuck on 27. Anyone mind taking a look at my code and seeing where i'm going wrong? (i know there are a bunch of threads for 27 but none of them seem to work for me.)

Thanks in advance.

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


#2

Hey @bigmouthsmithers, your Person constructor shouldn't need an equal sign between 'function' and 'Person' :slightly_smiling: