27. Loop The Loop



We're running a test below to make sure your code works.


// Our Person constructor
var Person = function(name,age) {
  this.name = name;
  this.age = age;
// Now we can make an array of people
var family = 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);
// loop through our new array
for(var i=0;i > family.length; i++){

For some reason I can't get to the name property of the Person object
Thanks to whoever answers this!:smiley:


HI in the for loop

for(var i=0;i > family.length; i++)

this part

i > family.length

i will never be great than family.length so you should put <


Yea, wismarco got it! just switch your greater than/less than around. Thanks, i couldn't get this one either.


Thanks That Really Helped!