Execute code for each element:
let colors = ["red", "green", "blue"]
colors.forEach(color => {
console.log(color)
})
// red
// green
// blue
// With index
colors.forEach((color, index) => {
console.log(index, color)
})
forEach() doesn't return anything. Use it for side effects like logging, not for creating new arrays.