Is there a way to create a function that takes an array and a number as parameters, then returns a new array with only the elements from the original array that are greater than the given number?
For example:
[10, 25, 16, -5, 30, 15, 24] , 16
The output should be:
[24, 25, 30]