Simon — flash a color sequence, you repeat it, it gets one longer each round. It's a 40-year-old toy and a perfect lesson in timed async, state machines, and the Web Audio API. Here's a playable build in vanilla JS (with real beeps, no audio files).

The sequence is just an array

Each round, push a random pad (0–3). To "show" it, you flash each pad in order with a delay between them — then hand control to the player.

Timed playback without callback soup

The flash loop is where beginners get stuck. Use async/await with a small sleep(ms) helper so the sequence plays one pad at a time, cleanly, then unlock input.