Suppose I have an array and I want to find first number in an array which is greater than 25. It checks for the condition i.e. whether the number is greater than 25 and should return true when the condition satisfies but it returns the value.Help me debug how it is working.
const numbers=[10,20,30,40,50]
function findNumJS(numbers,num){
const output=numbers.find(function(n){
return n>num
})
return output
}
console.log(findNumJS(numbers,25))