I have a question about the way the array is constructed in this lesson.
up until now I have only been taught to construct arrays like this:
var myArray = [22, "word", true];
In this lesson, they use this method:
var family = new Array();
family = new Person("alice", 40);
family = new Person("bob", 42);
family = new Person("michelle", 8);
// add the last family member, "timmy", who is 6 years old
family = new Person("timmy", 6);
Did I miss a lesson? Because This is the first time I've seen an array constructed this way. I am pretty sure I understand what is happening here and why this would be the preferred method, but I wanted to make sure I didn't miss something in previous lessons. Thanks!