Farhan Taher
May 5, 2021

--

Array filter() method in javascript

Javascript filter() method creates a new array with all elements that pass the test implemented by the provided function.

let array = [1, 2, 3, 4]

const filter = array.filter(arr => arr > 3)

console.log(filter)//[4]

--

--