title: Assignment in conditional expression
body: <p>I am trying to learn JavaScript at Codecademy. I am working on <a href="http://www.codecademy.com/courses/javascript-beginner-en-XEDZA/0/5" rel="nofollow">this problem</a> about for loops, and I can't figure out what is wrong with my code. It says "Assignment in conditional expression," but I don't know what that means. It is saying the error is at the second <code>for</code> statement. </p>
  
  <p>The goal is to change the value of <code>hits</code> to however many times my name was included in the <code>text</code> variable string.</p>
  
  <p>Here is my code:</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 ="Max Gee Max Gee Max Gee";    
  var myName = "Max";
  var hits=[];
  for(var i=0;i&lt;text.length;i++){
      if(text[i]==="M"){
          for(var j = i;j = myName.length;){
              hits.push("Max");
          }
      }
  }</code></pre>
  </div>
  </div>
  </p>