Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- process.stdin.resume();
- process.stdin.setEncoding('utf8');
- process.stdout.write('How old are u?');
- process.stdin.on('data', (int) => {
- actualYear=new Date().getFullYear();
- if (int<100){process.stdout.write(`You were born in ${int-actualYear} !`)}
- else {process.stdout.write('Please retry it without error')}
- process.exit()
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement