title: Javascript: Codeacademy: The lost numbers
body: <p>I am working on a Javascript exercise<a href="http://www.codecademy.com/courses/functions-in-javascript-2-0/2#!/exercises/4" rel="nofollow"> [1]</a>. Below is what I have written. I think, I am right. But it is obviously flawed. I do not have any clue what went wrong. Do you see?</p>
  
  <p>I tried debugging. How do I debug? Do you see any mistake?</p>
  
  <pre><code>var lost = [4, 8, 15, 16, 23, 42];
  
  var isLost = function (n) {
    for (var i=0; i++; i &lt;lost.length ) {
      if ( n === lost[i]) {
        return false;
      }
    }
    return true;
  };
  
  
  var ret = isLost(12);
  if ( ret === true) {
    console.log('12 is a lost number');
  }
  
  var ret = isLost(16);
  if ( ret === true ) {
    console.log('16 is a lost number');
  }
  </code></pre>