Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume()
- process.stdin.setEncoding('utf8')
- console.log('What\'s your age ? ')
- process.stdin.on('data', (age) => {
- if(age <= 0){
- console.log(`Congratulation, you will born soon or welcome newbie`)
- }else if(age < 99){
- console.log(`Good you survive ${new Date().getFullYear - age} years`)
- }else{
- console.log(`sorry Gays your are a spectre !!`)
- }
- //console.log('Hello ' + text)
- process.exit()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement