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 28, 2023
1 parent 4b03312 commit 9110ea4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/brain-games.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node

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

name();
4 changes: 3 additions & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import readlineSync from 'readline-sync';

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

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

0 comments on commit 9110ea4

Please sign in to comment.