JavaScript for WordPress Forums Vanilla JavaScript JS Arrays 1.2.09 Reply To: JS Arrays 1.2.09

Christina Hamilton

You have created an array of objects. To access each object, you must index into the array.

The first object would be people[0].

The value of “name” in that object would be people[0].name.

Can you see now how to build a for loop to access all the elements of the array, and pull out the value of name for each one?