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…

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;

}

"Is this qustion part of your assignmentt? We will write the assignment for you. click order now and get up to 40% Discount"