I started working on the Drum Machine project. My thought process is as follows: when I click a button, input state takes the id value of that button, and then the sound is played based on that input value.
I am trying to test whether each button click is passing its id to the input. I’ve used text (<p) tag that should become visible and show the id of the button when clicked. However, it seems that the input isn’t displayed each time a button is clicked, but only sometimes. The same thing can be seen in the console log, where sometimes the input is simply empty.
Any help is much appreciated!