Simon game [Problem Help]

Hi, Campers

This is my simon game project links : https://codepen.io/tanwanjern/pen/awNoYq

Question 1 : why the voice button able to click after i off?

You’re not doing anything to stop it from playing. Your switch has a style for being “off”, but you don’t yet have a way to tell your program that it should be off.

Ok, fixed that. Another Question : Why it didnt show win after i finish 20 times?

I only briefly glanced at your code, but line 124 reads: else if (typeof computer[20] !== "undefined"), I think that you mean computer[19] – an index of 20 is the 21st element because arrays in js are zero based (e.g. 0 is the first element).

still not working…have any better suggestion?

So, the best way to get help on the forums is to ask specific questions. “Why doesn’t my code work?” isn’t a very good question because you’re asking people to debug your code for you. Fixing things is part of the learning process. You should know your code better than anyone else, so you ought to know where to look.

its ok. Its actually work but I hv some bug start from the random machine I think. thank you for yr reply!