Introduction to Array.forEach
Premium
Sometimes you don't want a new array, you just want to do something with each element. forEach() is built for exactly that. This lesson explains when to reach for it instead of map or filter.
Sometimes you don't want a new array, you just want to do something with each element. forEach() is built for exactly that. This lesson explains when to reach for it instead of map or filter.