JavaScript30
JavaScript30 copied to clipboard
Lesson 01 - Fix bug when key is held down
This PR fixes the bug where if the key is held down the 'playing' class doesn't get removed. It does so by adding some lines to prevent the sound being played a second time until the same key is released. This also feels more intuitive as holding down a key doesn't make the sound play repeatedly, you must press the key repeatedly to do that.