Explain in plain English, using a single sentence, the purpose of the following function.
function whatDoIDoFunction (x, arr) {
var i = 0;
for(i=0; i < arr.length; i++){
if(arr[i] == x)
return i;
}
return -1;
}
Hi there! Click one of our representatives below and we will get back to you as soon as possible.