Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 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', (text) => {
  6. if (text > 0 && text < 100) {
  7. let age = 2019 - text
  8. console.log('Hello you were born in... ' + age)
  9. } else {
  10. console.log("Don't fuck with me kidd")
  11. }
  12.  
  13. process.exit()
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement