title: I am trying to write a js function that returns the index of a an array of strings, in case the string "keys" is in the array
body: <p>My function should return the index where "keys" is located, in case of success, or -1 if "keys" is not in the array.  But I get -1, I don´t see where is my mistake.</p>
  
  <pre><code>const findMyKeys = arr =&gt; { 
  for (let i = 0; i &lt; arr.length; i++) {
    if (arr[i] === 'keys') {
      return i;
    } else {
      return -1;
    }
  }
  }
  
  const randomStuff = ['credit card', 'screwdriver', 'keys']
  </code></pre>