how to make a table and then replicate the buttons
Use loops to repeat the same code several times. You can put the code that sets up a button in a loop to make many buttons.
how to change the value of the button
If you're using an input
element for the button, the value
property lets you change its label.
to a random number
Math.random
gives you a random number. You can build some logic around this to get what you want.
how to ... point them all to the same function
You can use event listeners to run code when the user clicks an element.