Audio Not Immediately Responding To Successive Button clicks (Drum Machine Certification Challenge)

Here’s my code pen: https://codepen.io/nwbnwb/live/eYJqdPe

If you’re able, please tell me why the audio isn’t instantaneously responding to successive button clicks as quickly as FCC Drum Machine Example.

Free Code Camps Drum Machine responds instantaneously to successive element clicks.

Certification Project Link For Drum Machine

FCC code pen for “Drum Machine”

You can set the currentTime property on the audio element to 0 before the .play()

e.target.firstElementChild.currentTime = 0;
e.target.firstElementChild.play();
1 Like