...

/

Challenge 2: Search First Occurrence of a Number

Challenge 2: Search First Occurrence of a Number

Given an array, find the first occurrence of the target number.

Problem Statement

Implement a function that takes an array arr, a testVariable (containing the number to search) and currentIndex (containing the starting index) as parameters. This function should output the index of the first occurrence of testVariable in arr ...