How can I Implement a better version of my function find the closest number to zero?
Your reviewers are correct. You are doing way too much work here. To find the number closest to zero you only need to find the smallest absolute value in the list. You should also clarify in the interview if the list can contain non-numeric values. There's no reason to test that the values are numbers unless you need to for the purpose of the review, although asking about this shows that you are thinking about edge cases, which is good. 

Either way, this can be done in a single loop with no storage other than keeping track of the current minimum:



function absSmallest(arr){
   if (!arr || arr.length === 0 ) return 0            // address requirement to return 0 when arr is undefined or empty
   let res = undefined                                // smallest value seen so far
   for (let i = 0; i &lt; arr.length; i++){
      if (res === undefined || Math.abs(arr[i]) &lt;= Math.abs(res)){
         res = Math.abs(arr[i]) === Math.abs(res)    // address requirement of positive value when there's a tie  
         ? Math.max(res, arr[i] )
         : res = arr[i]
      }
   }
   return res
}

console.log(absSmallest([5, 4, -9, 6, -10, -1, 8] ))
console.log(absSmallest([8, -2, 3, 2] ))
// check order of tied values
console.log(absSmallest([8, 2, 3, -2] ))

// edge case empty list returns 0:
console.log(absSmallest())
console.log(absSmallest([]))