Lesson 371/5
37

Array Loops

forEach and for...of loops

Modern Array Loops

JavaScript has special ways to loop through arrays that are easier than regular for loops!

// forEach - runs a function for each item

fruits.forEach(fruit => {

console.log(fruit)

})