Created
November 22, 2015 08:23
-
-
Save chuck0523/ff1ffbb21b92cf3e4d4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lines = []; | |
var reader = require('readline').createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
reader.on('line', function(line) { | |
lines.push(line); | |
}); | |
reader.on('close', function() { | |
for(var i = 0; i < lines.length; i++) { | |
console.log(i + ') ' + lines[i]); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment