Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume()
- process.stdin.setEncoding('utf8')
- const actualYear = 2019;
- console.log('What\'s your age ? ')
- process.stdin.on('data', (yearOld) => {
- if (yearOld<99){
- console.log(2019-yearOld)
- } else {
- console.log("You are nearly dead or you wrote text idiot")
- }
- process.exit()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement