I would like to filter an array of items by using the map() function. Here is a code snippet:
map()
var filteredItems = items.map(function(item) {
var arr = [1, 2, 3] // ES5 syntax arr = arr.filter(function(item){ return item != 3 }) // ES2015 syntax arr = arr.filter(item => item != 3) console.log( arr )