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… | Cheap Nursing Papers

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;

}

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp