Frontend, Drum-machine works, but fails on test 5-7 - (Solved) :)

Hi, I have built the drum machine according to the requirements (at least I think so). However I cannot get it to pass the tests 5-7 even though they work in the app.

  • I built it on my local machine
  • React 18 with useState and useEffect hooks
  • I am using Chrome as browser
  • I use React-use-keypress as dependencie for keypress.

Page & Repo

Is there a chance of someone in the forum with fresh eyes that can have a look and point me in the right direction?

Big Thanks

  • Don’t create a new Audio object to play the sound. Call play directly on the <audio> element in the HTML.
  • Your keypresses need to work for both lowercase and uppercase. Currently they only work for lowercase and I believe the tests are using uppercase, so you might be able to get by with using just uppercase, but really, they should work for both.

@bbsmooth Just what I needed to figure it out. Thanks for taking your time to guide me right. Some small rework and now it passes the tests!

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