Error adding objects to an array


#1

It keeps giving the error message "Unexpected token [ "
I know that this is on line 8 with the new variables, but I don't know why it's giving me this error or how to fix it. The goal of this lesson is to add objects to an array and print out the name. Thanks in advance

// Our Person constructor
function Person(name, age){
    this.name = name;
    this.age = age;
}
var family = new array();
// Now we can make an array of people
var family[0] = new Person("alice", 40);
var family[1] = new Person("bob", 42);
var family[2] = new Person("michelle", 8);
var family[3] = new Person("timmy", 6);
// loop through our new array
for (var i = 0 ; i < 4 ; i++){
    console.log(family[i].name);
}


#2

The var keyword should not be there on any of those, because you're adding to an already made array, not making a new one.


#3

I tried it and it worked out so thank you so much!