Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume()
- process.stdin.setEncoding('utf8')
- console.log("How old are you?")
- process.stdin.on('data', (age) => {
- let year = 2018;
- if (age <= 99) {
- console.log(year - age);
- }
- else {
- console.log("Sorry, there is an error")
- }
- process.exit()
- })
Add Comment
Please, Sign In to add comment