Created
September 26, 2019 01:27
-
-
Save huttj/11a41df0420468331c70b34704bb64ba 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
const readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false | |
}); | |
const lines = []; | |
rl.on('line', line => { | |
lines.push(line); | |
}); | |
rl.on('close', () => { | |
console.log(lines.reverse().join('\n')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment