Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. process.stdin.resume()
  2. process.stdin.setEncoding('utf8')
  3.  
  4. console.log('What\'s your age ? ')
  5. process.stdin.on('data', (age) => {
  6. if(age <= 0){
  7. console.log(`Congratulation, you will born soon or welcome newbie`)
  8. }else if(age < 99){
  9. console.log(`Good you survive ${new Date().getFullYear - age} years`)
  10. }else{
  11. console.log(`sorry Gays your are a spectre !!`)
  12. }
  13. //console.log('Hello ' + text)
  14. process.exit()
  15. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement