code: function printText (filename, speed) {
    fs.createReadStream(filename).on('data', function(data) {
      var data = String(data);
      for (var i = 0; i < data.length; i++) {
        (function (i) {
          setTimeout(function () {    
            if (i == data.length - 1) {
              process.stdout.write(data.charAt(i)+'\n');
            } else{
              process.stdout.write(data.charAt(i));
            };
          }, speed*i)
        })(i);
      };
    });
  }
docs: print text