Find the first occurrence of number 5 in the given array and return its index. If the number is not found, return -1.
Break and continue statements
The first occurrence
Report a typo
Sample Input 1:
10 3 8 5 3 4 5Sample Output 1:
3Sample Input 2:
5 10 111 12Sample Output 2:
0Write a program in JavaScript
function find5(numbers) {
// change it
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.