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 u ? ')
- process.stdin.on('data', (age) =>
- {
- if (age > 99 )
- {
- console.log ("Vous avez saisi un chiffre supérieur a 99 !")
- process.exit()
- }
- /*else if (age = String)
- {
- console.log ("Vous avez saisi un charactères !")
- process.exit()
- }*/
- else
- {
- annee = (2019 - age)
- console.log('You were born as ' + annee)
- process.exit()
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement