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', (age) => {
- if (typeof(age) == 'number'){
- if (age>0 && age<99) {
- if ((2019-age)<2019){
- return (2019 - age);
- }
- }
- }
- console.log('You are born in ' + (2019-age))
- process.exit()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement