DEV Community

loading...

Discussion on: Pure and Simple - Tic Tac Toe with Javascript

Collapse
giftedgeek profile image
Rajesh

What is data-cell-index btw?

Collapse
bornasepic profile image
Borna Šepić Author

The data-cell-index is a custom attribute on an HTML element, you can read more about them here: developer.mozilla.org/en-US/docs/L...

We are using it to more cleanly track the position of the cell that has been clicked and to update the game state array at its position.

Forem Open with the Forem app