The map(), reduce() and filter() are array functions are used for  manipulate or modifying an array instead of using the loops. Here is an example how to use these methods to manipulate arrays in JavaScript.

// map method
var myArray = [1, 2, 3, 4, 5];
var multipliedArray = myArray.map(function(element) {
    return element * 2;
});
console.log(multipliedArray); // [2, 4, 6, 8, 10]

// Filter method
var myArray = [1, 2, 3, 4, 5];
var evenNumbers = myArray.filter(function(element) {
    return element % 2 === 0;
});
console.log(evenNumbers); // [2, 4]

// Reduce method
var myArray = [1, 2, 3, 4, 5];
var sum = myArray.reduce(function(acc, cur) {
    return acc + cur;
}, 0);
console.log(sum); // 15

 The map(), reduce() and filter() methods work on the original array and doesn’t change it, it returns a new array.