This short screencast demonstrates how to use the forEach() method to apply a function to each item in an array using both arrow function and function keyword syntax. It also compares the forEach() method to a traditional for loop.
Then, the forEach() method is applied to a nodelist of img elements as returned by the querySelectorAll() method. The getElementsByTagName() method, which returns and HTML collection is also discussed.
Thank you for viewing! Happy Coding!
All of my YouTubes can be found at: https://learncs.w3spaces.com/