Drum Machine weird behavior

Hello everyone! This is my solution for the drum machine project.
FCC Drum Machine (drum-machine-joelweb.netlify.app)
Projects/App.js at main · JoelLH/Projects (github.com)

My main concern is:
The project didnt pass the last test but it worked fine, then i changed a line of code that changes the keyDowns to upperCase and it passed the tests but now it only works if i press the key with the capsLock on
Does anyone know a solution for that?
Also any feedback is welcomed
Thank u!

Just lowercase the event key and keep the letters array lowercase as well.

BTW, the code you have deployed and the repo code are not the same.

1 Like

Thank u for the comments, I’ve updated the repo.
I tried what u suggested and it didn’t work and ended up doing the opposite and it worked, now it doesn’t matter if I press a key with Caps lock and it passed the tests. Not sure why it’s working now but thank u for the help!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.