...
/Challenge 2: Search the First Occurrence of a Number
Challenge 2: Search the First Occurrence of a Number
Given an array, find the first occurrence of a given target number.
We'll cover the following...
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 and outputs the index of the first occurrence of testVariable
in arr
. If testVariable
is not found in ...