title: Why for loop stops at first iteration?
body: <p>I want to find the longest word in the array by using a for loop.
  But the iteration stops at the first pass.
  What am I missing?</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>var a = "hello asdf asdf sdfgfghkkjb";
  var s = a.split(" ");
  var m = -Infinity;
  for (var i = 0; i &lt; s.length; i++) {
    if (s[i].length &gt; m) {
      m = s[i];
    }
  }
  console.log(m)</code></pre>
  </div>
  </div>
  </p>