Drum Machine - Doesn't pass test 6

Hi,
For the Front-End certification testing, on my Drum Machine project, I am at 7/8 - everything works, but it doesn’t pass test 6 … As you probably know, the text of the test seems to imply that pressing the keys don’t result in sounds, or at least the correct ones, but as said: this appears not to be the case. ???

Where to go from here? any guidance would be helpful.

Thank you.
D

I forgot to include a link …

Hi again,
I’ve looked at the example project in Developer Tools & see no difference to my code - there’s an audio element with a src attribute of the correct clip, which is playable

I tried to see if my external JavaScript packages were similar, and they are, except I am running version: 17 of React -
https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js … + https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js
because version 15 used in the sample, gave me an error on render …

Thanx

image

Take a close look at lines 146-156 in the example’s JS code. You need to have a keydown handler to play the sounds when the user presses one of the keys in the keypad.

Thanks a lot.
I interpreted the keypad as the HTML keys, not the keyboard keys.
Got it to pass.
Have a good day :grinning:

1 Like

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