I have been trying to learn Java Script and the lessons I have been going through seem to be fine but i have not started to come across the two projects of rock,paper scissors and sleep debt project and even when i have check the code and followed it up with putting in the exact code from the youtube video it still shows errors and will not let me complete it.
Please let me know if this is an ongoing issue for anyone else?
I have been at this forums for years, at this stage in the learning process, 9 out of 10 times learners made some small mistake. Which can happen, and is totally fine
the best way we can help you is if you provide:
your code
the exercise/project url
any possible error messages
Then we can help you solve the issue, or if there is a problem with the exercise, we would better be able to report the issue to codecademy and get it fixed
/home/ccuser/workspace/javascript_101_Unit_3/Unit_3/rockPaperScissors.js:4
if (userInput === ‘rock’ || userInput === ‘paper’) (userInput === ‘Scissors’) {
^
SyntaxError: Unexpected token {
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)
I’m not 100% sure but from my understand the error here is due to closing the constant getUserChoice too early and for that reason the program reads the rest of your input as new code instead of part of the constant.