I tried creating a separate function called playTimedGame. I expected it to run a timer on displaying the "you lose" alert after a certain number of seconds, but instead clicking the timer refreshes the page.
My repo link is https://github.com/caitlindaitch/ConcentrationGame and my question is about lines 71-81.
PS. Sorry my project is still in a separate repo! I will fix it later.
I tried creating a separate function called playTimedGame. I expected it to run a timer on displaying the "you lose" alert after a certain number of seconds, but instead clicking the timer refreshes the page. My repo link is https://github.com/caitlindaitch/ConcentrationGame and my question is about lines 71-81.
PS. Sorry my project is still in a separate repo! I will fix it later.