title: Delay using readline in nodejs
body: <pre><code>function  readFile(){  
    var lineReader = require('readline').createInterface({
      input: require('fs').createReadStream(FILE_PATH)
    });  
    lineReader.on('line', function (line) {
      setTimeout(() =&gt; {
        console.log("HEYYYYY");     
      }, 10000);    
    });
  }
  </code></pre>
  
  <p>Why does this only waits 10 seconds once , and the prints 'hey' ? I want to print hey each 10 seconds but it's not working. No idea why.</p>
  
  <p>Edit: This is going to be repeated by the amount of lines that there are on a file (look at the listener 'line') I need to delay 10s between each line.</p>