diff --git a/bin/brain-games.js b/bin/brain-games.js index 3bb6354..e1a6e3a 100755 --- a/bin/brain-games.js +++ b/bin/brain-games.js @@ -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(); diff --git a/src/cli.js b/src/cli.js index cd6d717..0976342 100644 --- a/src/cli.js +++ b/src/cli.js @@ -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 + '!')); \ No newline at end of file +export const greetGamer = () => { +const name = readlineSync.question('May I have your name?'); +console.log('Hello, ' + name + '!') +};