Untitled

Anonymous
javascript
09/06/2021 7:15 AM
548 B
16
Indexable
process.stdout.write("This programm is a game.\nPlease, type in a nymber : ");
process.stdin.on("data", function(inputFromUser) {
    let givenInput = parseInt(inputFromUser);
    process.stdout.write('\nYou typed in ' + givenInput + '.');
    process.stdout.write('\nMy number is ' + (givenInput + 1) + '.');
    process.stdout.write('\nSorry, you lost. I won. Thanx for the game.');
    process.exit();
});
Editor is loading...