Skip to content

Commit

Permalink
add bin/brain-games.js src/cli.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Sep 29, 2023
1 parent 86afba4 commit c1fbad9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/brain-games.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import readlineSync from 'readline-sync';
import { name } from '../src/cli.js'
import { greetGamer } from '../src/cli.js'

name();
greetGamer();
6 changes: 4 additions & 2 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ import readlineSync from 'readline-sync';

console.log('Welcome to the Brain Games!');

export const name = () => readlineSync.question('May I have your name?');
console.log(name ('Hello, ' + name + '!'));
export const greetGamer = () => {
const name = readlineSync.question('May I have your name?');
console.log('Hello, ' + name + '!')
};

0 comments on commit c1fbad9

Please sign in to comment.