const list = [1,2,3,4,5] const even_list = list.filter((accumulator,element)=>{ return element % 2 == 0 })
filter() and reduce() will iterate over all the array items, while find() will be faster.
0 Comments