title: Javascript - Push characters from string to array using for loop
body: <p>before you look at my issue please note I am a novice and I'm currently working through the codecademy javascript course but I'm extremely stuck on this bit which may look stupid to some. Just trying to get my head around linking things with for loops.</p>
  
  <p>Trying to push all the characters from my name in the string to the array "hits".</p>
  
  <p>I would really appreciate some guidance.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var text = "hi it's raheel that's right raheel did i mention it's raheel it actually is raheel"
  
  var myName = "raheel"
  
  var hits = []
  
  for (var i = 0; i &lt; text.length; i++); {
  
    if (text[i] === "r") {
  
      for (var j = i; j &lt; i + myName.length; j++);
      hits.push(j))
  }
  }</code></pre>
  </div>
  </div>
  </p>