/*
- map()
- filter()
- reduce()
- some() / every()
- find() / findIndex()
- forEach()
Plus:
- slice()
- concat()
- includes()
- array spread operator
*/
const numbers = [1, 2, 3, 4, 5];
// instead of this
for (let i = 0; i < numbers.length; i++) {
console.log(numbers[i]);
}
// use this
numbers.forEach(number => {
console.log(number);
});
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)