The front end New syntax for arrays (using the filter function) December 31, 2023 by Glenn Dorsey No Comments 1) the filter function Var arr =,45,312,456,789,13213 [123456789]; Var result = arr.filter(function(item){//console.log(itm) return item>300; }) console.log(result) // print [456, 789, 312, 456, 789, 13213]Copy the code