Build a Drum Machine - user story #6

Tell us what’s happening:


Could I ask for help with “Build a Drum Machine” React challenge? It seems to me that everything works perfectly fine but I am unable to pass test #6 and I can’t figure out why. Link to Codepen below.

Many thanks for any help!

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0.

Link to the challenge:

here is the solution to your problem.

  handleKeyPress(event) {
    let foo = event.key.toLowerCase()
    if (keys.indexOf(foo) > -1) {

What the tests wanted you to accomplish is for the drum machine to work regardless if the event.key is lower case or uppercase.

adding let foo converts every input to lower case.

1 Like

Brilliant! Thank you very much.