Help! - Simon game colors flashing like crazy!

Can someone please help me. I have been stuck on this for over a month! I can’t figure out why the color elements start flashing like crazy after round 2. Any help would be greatly appreciated.

thanks in advance,


To use clearTimeout, you must have a valid id which would have been created as a return value for a setTimeout call. I do not see where you are assigning your setTimeouts to variables and then calling the clearTimeouts with the applicable variables. For example, the following code would set to timer variables, but only one would get cleared.

var timer1 = setTimeout(function() {
  // do something
}, 1000);

var timer2 = setTimeout(function() {
  // do something else
}, 1000);

clearTimeout(timer1);  // clears timer1
1 Like

Thanks Randell that was exactly what I was missing! Gotta few more bugs to work out but at least I’m moving forward.

Thanks again!