function newFilter(arr, fn) { let newArr = []; for (let i; i < arr.length; i++) { if (fn(arr[i])) { newArr.push(arr[i]); } } return newArr; }