title: For loop condition issues
body: <p>I am having troubles figuring out the for condition for a javascript learning course I am doing.</p>
  
  <p>I am not getting normal errors because I am doing it in the course, but the error I am receiving in the course is this...</p>
  
  <p><code>Oops, try again. Careful: your second 'for' loop should stop when it reaches its current point in the string + myName.length.</code></p>
  
  <p>These are the instructions:</p>
  
  <pre><code>First, you'll want to set your second loop's iterator to start at the first one, so it picks up where that one left off. If your first loop starts with
  
  for(var i = 0; // rest of loop setup
  your second should be something like
  
  for(var j = i; // rest of loop setup
  Second, think hard about when your loop should stop. Check the Hint if you get stuck!
  
  Finally, in the body of your loop, have your program use the .push() method of hits. Just like strings and arrays have a .length method, arrays have a .push() method that adds the thing between parentheses to the end of the array. For example,
  
  newArray = [];
  newArray.push('hello');
  newArray[0];   // equals 'hello'
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>var text = "Hello, my name is Becky. What is your name?\
  I repeat, my name is Becky. Can't you figure out that my\
  name is Becky. Becky!!!!";
  var myName = "Becky";
  var hits = [];
  for (i = 0; i &lt; text.length; i++) {
      if (text[i] === 'B') {
          for (var j = i; i &lt; myName.length; i++) {
              hits.push();
          }
      }
  }
  </code></pre>
  
  <p>I know the issue resides in this line:</p>
  
  <p><code>for (var j = i; i &lt; myName.length; i++) {</code></p>
  
  <p>I just can't figure out exactly how I need to structure it.</p>
  
  <p>UPDATE:</p>
  
  <p>Final answer of question:</p>
  
  <pre><code>/*jshint multistr:true */
  var text = "Hello, my name is Becky. What is your name?\
  I repeat, my name is Becky. Can't you figure out that my\
  name is Becky. Becky!!!!";
  var myName = "Becky";
  var hits = [];
  for (i = 0; i &lt; text.length; i++) {
      if (text[i] === 'B') {
          for (var j = i; j &lt; (i + myName.length); j++) {
              hits.push(myName);
          }
      }
  }
  if (hits === 0) {
      console.log("Your name wasn't found!");
  } else {
      console.log(hits);
  }
  </code></pre>