Loop through the data
Arrays need the index to return the value associated with it. The index values are sequential which makes it easy to select the next item in the array. We can get the length of the array as its already a property for the array.
When creating arrays that contain objects that are intended to be grouped and output with iteration, keep data structured the same so that you can easily determine where the values are located. If all the objects that are items in the array share the same key values, then these can be coded and selected as we loop through the contents. No surprises we should know what the keys are in order to loop through the array items and output all of them consistently. This is important to plan when creating objects that will be used in this way.
The forEach() method executes a block of code within the function once for each array element.