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 b544c9b commit 88c0824Copy full SHA for 88c0824
bin/brain-games.js
@@ -1,2 +1,5 @@
1
#!/usr/bin/env node
2
-console.log("Welcome to the Brain Games!");
+
3
+import nameHell from "../src/cli";
4
5
+nameHell()
src/cli.js
@@ -0,0 +1,10 @@
+import readlineSync from 'readline-sync';
+const nameHell = () => {
+ console.log('Welcome to the Brain Games!');
+ const name = readlineSync.question('May I have your name? ');
6
7
+ console.log(`Hello, ${name}!`);
8
+};
9
10
+export default nameHell;
0 commit comments