The forEach() method calls a defined "callbackFn" one time for each element inside of an array. The "callbackFn" is invoked using three arguements:
The value of the element
The index of the element
The Array object being traversed
- forEach((element, index)
- forEach((element, index, array)
In the example provided above, the "array1.forEach" line is going into array1 and console.log(ging) each element inside of the Array("a", "b", "c"). If the elements were ordered ("c", "b", "a") then it would log the elements in that order.