title: End of file in JavaScript
body: <p>I want to read a local file line by line in JavaScript. Ut I can check if it goes to the end of this file. For example:</p>
  
  <pre><code>file = new ActiveXObject("Scripting.FileSystemObject"); 
  
  // Sets the variable "f" to equal the new open file contents 
  
  f = file.OpenTextFile("c:\\wantlist.txt", 1); 
  s = f.ReadLine()
  
  While(s != EOF)
  {
      //. Do some thing 
      s = f.ReadLine()
  }
  </code></pre>
  
  <p>What is EOF should be in JavaScript? Or do you have another way to deal with this problem? Thank you very much!</p>