Need help in loop the loop


#1



Hi,

Need some help on Loop the Loop.

https://www.codecademy.com/en/courses/spencer-sandbox/4/2?curriculum_id=506324b3a7dffd00020bf661#

System alert for syntax error: unexpected token =

Anyone can help point out the wrong part?


// 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();

// loop through our 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<4; i++)
{
 console.log (family[i].name); 
}


#2

Remove the stray = sign from this line.


#3

Got it and working now! Thank you.