I'm not entirely certain if what I'm trying to do may be possible. However,
<button class = "numbers" value=1>1</button>
all the way to
<button class = "numbers" value=9>9</button>
For example, I have 1 all the way to 9, when one of these buttons were to be clicked, I want the values to be console logged. So, if I clicked the number 1 for example, it would just console log 1 as an int using the value of that specific button, without having to specify each button individually.
Thank you for helping in advance!
<input type='button' value='1' />. You'll need to assign an event listener for the click event. I'd definitely look for a JS tutorial for this.<button>element has avalueattribute and property.