Loop for with arrays in Objects



Hi your for loop should have that strutture

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


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


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


i < family.length;


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


Hope that could help you