8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef01058 commit 0ad1ad2Copy full SHA for 0ad1ad2
JavaScript/1-console.js renamed to JavaScript/0-console.js
JavaScript/2-readline.js renamed to JavaScript/1-readline.js
JavaScript/2-await.js
@@ -0,0 +1,18 @@
1
+'use strict';
2
+
3
+// Node.js v17
4
5
+const readline = require('readline').promises;
6
7
+const rl = readline.createInterface({
8
+ input: process.stdin,
9
+ output: process.stdout
10
+});
11
12
+const main = async () => {
13
+ const name = await rl.question('Enter your name: ');
14
+ console.log(`Hello, ${name}!`);
15
+ rl.close();
16
+};
17
18
+main();
0 commit comments