title: if statement with && and .length
body: <p>I wonder why console says 'Cannot read property 'length' of undefined' when I combine two if conditions together? </p>
  
  <pre><code>//After two if's combined by &amp;&amp;:
  for(n= 0, len=i.length; n&lt;len; n++) {
      if(typeof n[i] !== 'string' &amp;&amp; n[i].length &gt; longest.length) 
        longest = n[i];
  }
  
  
  // Before I combine two if's:
  for(n= 0, len=i.length; n&lt;len; n++) {
      if(typeof n[i] !== 'string') continue;
      if(n[i].length &gt; longest.length) longest = n[i]; 
  }  
  </code></pre>