Created
October 15, 2023 16:34
-
-
Save keksipurkki/53a60abbbdf86a799e326ec407431945 to your computer and use it in GitHub Desktop.
hello_world.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import * as readline from "node:readline/promises"; | |
const { stdin: input, stdout: output } = process; | |
const rl = readline.createInterface({ input, output }); | |
const name = await rl.question("What is your name? "); | |
console.log(`Hello there, ${name}`); | |
rl.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment