27 what is the "unexpected token"?


#1

here is the code I am trying to use for the exercise but it keeps bringing the error, "unexpected token". I can't figure it out.

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

// Now we can make an array of people
var family = 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

You have a syntax error on creating a function.

function Test(parameters) {
  do something;
};

Semicolons for javascript are a sign to end a sentence, but function is a long sentence until you close it by curly bracket.


#3

thank you @cssblaster73027! Can't believe I didn't catch that.