Loop for with arrays in Objects


#1


#2

Hi your for loop should have that strutture

for (statement1, statement2, statement3) { 
    // here do something
}

#3

i know i cant imagine how i would complete the current task. I have been stuck at this exercise 3 days already


#4

Hi here what they says to do in your for loop

Create a for-loop that loops through the family array and prints out the `name property for each family member in order of creation.

for (statement1, statement2, statement3) { 
    // here do something
}

in the statement1 you hsould have that

var i = 0;

In my case I chose i but you can choose any name you want.
I set the i equale to 0 because I want it to print all the menber of family array starting from index 0

statement2

i < family.length;

statement3

i++
or
i = i + 1

then inside insde the console.log() you should print all the name of the array family you just need to do it like that

family[i].name

Hope that could help you