Hello fellow campers,
I have searched this problem all over the forum and, although my code works manually and addresses all the common errors that other campers have had (see below) I still can’t pass test #6!!
My drum machine fulfills:
- able to be triggered manually by keydown
- checks for keydown, not keypress
- doesn’t need to be focused on the button to trigger the sound
- checks for event.keyCode
Error from test #6:
No audio plays when the A key is pressed : expected true to be false
(actually slightly different from most of the other forum posts, which say it fails on Q)
When I console long the event.keyCode in handleKeyDown(), I notice that the test doesn’t even press the A key, it presses the Q key, and it also logs from within the block of code that would execute if the key triggered the audio. Not sure why it says that A caused an error then, or why it says the audio didn’t play.
Anyways, here is my repo. Thank you in advance for taking the time to help!