Ajax-loader-large-white
Introduction to Objects I
Arrays of Objects

Remember that an object is just another type, like a string or number but more complex. This means that just as we can make arrays of numbers and strings, we can also make arrays of objects.

Here we have our Person constructor which should look familiar. We can use this constructor to make an array of Person objects, similar to how we might make an array of numbers but filling in people instead.

Instructions

Add one more Person to the family array, "timmy", who is 6 years old.

?
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

In this case you can add a 4th element to the family using:

family[3] = new Person(name, age);

Here the name should be "timmy" and the age should be 6.

script.js