Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume()
- process.stdin.setEncoding('utf8')
- let year = 2019
- console.log('What\'s your age ? ')
- process.stdin.on('data', (value) => {
- value = Number(value);
- if (value > 99){
- console.log('Value is too high')
- } else {
- console.log(year-value)
- process.exit()
- }
- process.exit()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement