The first occurrence

Report a typo

Find the first occurrence of number 5 in the given array and return its index. If the number is not found, return -1.

Sample Input 1:

10 3 8 5 3 4 5

Sample Output 1:

3

Sample Input 2:

5 10 111 12

Sample Output 2:

0
Write a program in JavaScript
function find5(numbers) {
// change it
}
___

Create a free account to access the full topic