Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. process.stdin.resume()
  2. process.stdin.setEncoding('utf8')
  3.  
  4. console.log('How old are you ? ')
  5. process.stdin.on('data', (number) => {
  6. if(number > 99){
  7. console.log("Are you sure about that?");
  8. } else if(isNaN(number)) {
  9. console.log("That is not a number");
  10. } else {
  11. const year = 2019-number;
  12. console.log('2019' - (number))
  13. }
  14. process.exit()
  15. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement