Simon Game JavaScript Tutorial for Beginners


In this JavaScript game tutorial, you will learn how to create a Simon game using JavaScript, HTML, and CSS. Every line of JavaScript is explained.

🔗Full code:
🔗HTML file:
🔗CSS file:

Tutorial by Beau Carnes.

🐦Follow Beau on Twitter: @CarnesBeau

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:


Xem thêm bài viết khác:


  1. Thank you very much, Beau Carnes. I really appreciate you taking the time to create this video. I am also glad that you provided us the code in case we got stuck. I was trying to keep up with the video and missed some brackets.

  2. Hey Beau, would like to ask you a question. When the user presses a button you setTimeout( () => { clearColor()} , 300); which makes the color disappear after 300 ms. However I'd like to keep the button lit up as long as the user holds down his click button. Is there a way in JS to achieve this?

  3. At 47:26 I am getting this console error:
    index.js:124 Uncaught TypeError: Cannot read property 'style' of null
    at clearColor (index.js:124)
    at gameTurn (index.js:76)

    Anyone have thoughts on this?

  4. at 32:26 in the video I attempt to print to the console the filled array but nothing happens when I click start. Just to verify the project worked I copied the JS script and pasted it and run it. However I get an uncaught error property play or null for the function “four” Can someone explain why this happens. I am using sublime text with google chrome browser.

  5. My code isn't working can someone help please? Thanks.

  6. why didn't you put brackets after game turn in intervalID. gameTurn is a function. Shouldn't there be brackets after it?

  7. Hey guys, if anyone is interested I completed my Simon game from scratch with unlimited rounds to play with helpful comments.

  8. Hi thanks for the video.

    At around 22 minutes in, when you use the if statement with strictButton.checked, couldn't you just do strict = strictButton.checked and not even need the conditional?

  9. Guys Look at this please, have tried stack overflow….

    VM144 index.js:22 Uncaught TypeError: Cannot read property 'addEventListener' of null

    at VM144 index.js:22

    (anonymous) @ VM144 index.js:22

    index.js:1 Uncaught SyntaxError: Identifier 'order' has already been declared

    at VM144 index.js:1

    (anonymous) @ index.js:1

  10. That looks like the requirements of the assignment example. But wait, I thought students are supposed to figure it out to complete the assignment on their own if they can and not just copy or spoon feed? If they work in this field, they can't rely on others all the time to complete their own job…Freecodecamp resources should be ample and good for its purpose I think, but for those looking for more maybe i.e. 4.8 or higher rated Udemy free and paid courses can help:

  11. Just when I was looking for sources to learn Javascript, this video appeared. I already Love but these videos are cherry on the cake. Love it.

  12. I am confused? On lines 89 and 78 of the index.js I get a "Uncaught TypeError" and its says "document.getElementbyID is not a function"???


Please enter your comment!
Please enter your name here