Rock, Paper, Scissors

hi hopefully I can get some help with this last bit of my project even watched the walkthrough assuming I have missed something thanks in advance :sweat_smile:

const playGame () => {
const userChoice = getUserChoice(‘scissors’);
const computerChoice = getComputerChoice();
console.log('you threw: ’ + userChoice);
console.log('The computer threw: ’ + ComputerChoice);

 console.log(determineWinner(userChoice, computerChoice));

};

playGame();

Error message

/home/ccuser/workspace/javascript_101_Unit_3/Unit_3/rockPaperScissors.js:52
const playGame () => {
^^^^^^^^
SyntaxError: Missing initializer in const declaration
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:151:9)

Hello @arc0275496973, welcome to the forums. Are you sure you’re defining playGame() correctly? The syntax should look like this:

const someFunction = () => {
   //some code
};

Does your function definition look like that?
I hope this helps!

1 Like

Exactly what @codeneutrino said! Check how you defined that function, looks like you a typo!

1 Like

thank you :rofl: such as stupid typo all working now!

1 Like