Tell me, please, how can I get the indexes (row number and column number) of the table cell if I have an element ( HTMLTableDataCellElement ) corresponding to this cell?
(For example, I hang up a click handler on the entire table, get a cell that was clicked through event.target and then I need to know the row and column number of this cell)
document.querySelector('table').onclick = (event) => { let cell = event.target; let i = ??? let j = ??? } <table> <tr> <td>0,0</td> <td>0,1</td> </tr> <tr> <td>1,0</td> <td>1,1</td> </tr> </table>