title: Changing every other letter in a string (JavaScript)? Each new word starts 0 based
body: <p>I have this mostly working, but when certain letters are next to each other it's not doing the uppercase to them. Any ideas why it's missing them? My code and the expected outcome is below. The problem is with the "ooooo's", and "Looks"...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function toWeirdCase(string) {
    var splitStr = string.split(" ");
    var newArr = [];
  
    for (var j = 0; j &lt; splitStr.length; j++) {
      var letters = splitStr[j].split("");
      for (var i = 0; i &lt; letters.length; i++) {
        if (letters.indexOf(letters[i]) % 2 === 0) {
          letters[i] = letters[i].toUpperCase();
        }
      }
      newArr.push(letters.join(""));
    }
    console.log(newArr.join(" "));
  }
  
  console.log(toWeirdCase('ooooo')); //Should return 'OoOoO'
  console.log(toWeirdCase('howdy')); //Should return 'HoWdY'
  console.log(toWeirdCase('Looks')); //Should return 'LoOkS'
  console.log(toWeirdCase('This')); //Should return 'ThIs'
  console.log(toWeirdCase('is')); //Should return 'Is'
  console.log(toWeirdCase('This is a test')); //Should return 'ThIs Is A TeSt'`</code></pre>
  </div>
  </div>
  </p>