In JavaScript, in addition to using loops, you can also use built-in array methods, which provide a preset way of performing iteration on arrays
These built-in array methods are called iteration methods (aka iterators)
.forEach()
- return value: undefined
.map()
- return value: new array
.filter()
- return value: new array
.findIndex()
- return value: index number
.reduce()
- return value: a single value
.some()
- return value: boolean
.every()
- return value: boolean
All iteration methods in JavaScript take in a callback function
Syntax and other information on how to use the iteration methods can be found in the MDN documentation for each array method