Drum Machine Project - Not passing test #6 but functionally fulfills requirements

Hi there, I have made what is functionally required for the project (eg the requirements of having a drum machine with drum pads that when clicked, display a line of text describing it, and also plays a specific sound associated with each key or click). I did mine using functional components instead of class ones. I can’t pass test #6. I don’t need the onKeyPress thing in my div because it’s handled in my event listener. But functionally this does get the job done. Is there somewhere that I’ve overlooked? Is there somewhere architecturally that needs restructuring? Please advise… I would appreciate any help I could get.

鼓式机器 (codepen.io)

You’re always playing first note:

let sound = document.getElementsByClassName("clip")[0]

Oops… that was embarrassing. Thank you!

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