Advertisement
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', (number) => {
- if(number > 99){
- console.log("Are you sure about that?");
- } else if(isNaN(number)) {
- console.log("That is not a number");
- } else {
- const year = 2019-number;
- console.log('2019' - (number))
- }
- process.exit()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement