If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
script.js:315 Uncaught ReferenceError: intervalForGame is not defined
at setOrClearInterval (script.js:315)
at stopGame (script.js:300)
at winOrLose (script.js:274)
at playGame (script.js:260)
What is your best guess as to the source of the problem?
I need to move things around to change the scope for my intervalForGame.
What things have you already tried to solve the problem?
I've tried moving/ separating/ combining different functions and vars, but no success :( Either the game doesn't work as intended or I get another error message.
What's the problem you're trying to solve?
I'm trying to make my stop game function work, but I'm having issues with scope.
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
script.js:315 Uncaught ReferenceError: intervalForGame is not defined at setOrClearInterval (script.js:315) at stopGame (script.js:300) at winOrLose (script.js:274) at playGame (script.js:260)
What is your best guess as to the source of the problem?
I need to move things around to change the scope for my intervalForGame.
What things have you already tried to solve the problem?
I've tried moving/ separating/ combining different functions and vars, but no success :( Either the game doesn't work as intended or I get another error message.