how to remove nun numeric item form array javascript : how to remove nun numeric item form array javascript.

Is there anything wrong in this answer

    function filterNumbersFromArray(arr) {
      // Write the code that goes here
      arr = arr.filter((item) => {
        return (typeof item == 'number')
      })
      console.log(arr);
      this.arr = arr;
    }
    
    var arr = [1, 'a', 'b', 2,false,0,5];
    filterNumbersFromArray(arr);
    for (var i = 0; i < arr.length; i++)
      console.log(arr[i]);