This is a function to filter a number from a given array, and the solution must be inside the function. here is my solution: