Skip to content

Commit 88c0824

Browse files
rootroot
authored andcommitted
add new fiches(nameHell) and src/cli.js
1 parent b544c9b commit 88c0824

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

bin/brain-games.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
#!/usr/bin/env node
2-
console.log("Welcome to the Brain Games!");
2+
3+
import nameHell from "../src/cli";
4+
5+
nameHell()

src/cli.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import readlineSync from 'readline-sync';
2+
3+
const nameHell = () => {
4+
console.log('Welcome to the Brain Games!');
5+
const name = readlineSync.question('May I have your name? ');
6+
7+
console.log(`Hello, ${name}!`);
8+
};
9+
10+
export default nameHell;

0 commit comments

Comments
 (0)