In my code, I have an 8x8 table with each <td>
having an id of two numbers ranging from 0-7 (i.e. "0, 0", "2, 5", etc). What I need is to make a function that when I click on a <td>
it gives me the first and the second numbers of the id.
I thought maybe I can do this with arrays, but I don't know how to extract the two separate numbers from the id in the first place.
I am a beginner in javascript/html, so an explanation with the answers will be very helpful!