So , I have been learning HTML and CSS , and Iam trying to make a tic tac toe game.
Iam trying to write a function on JavaScript that increments ( ++) a value ( this value is equal to the round of the game) when I click on the board ( when I places an X or “O” to the board).
I am not really sure how to do it , I thought maybe try to loop or something like that. but this probably requires an EventListener or something like that ??
You may find it easier to use a framework such as React to make a tic-tac-toe game. They have a good tutorial for this on the React website. But it would be a good idea to go through JS and React courses first.
Thanks for the help, I am just trying to put to the test some of the knowledge I got on HTML and CSS and I have almost completed the JavaScript course on CodeCademy .
I’am really close to achieving the final goal of making the game playable cause the layout is pretty much done. Iam just stuck on some small interactivity ( javaScript) stuff I still dont know how to do. This is what the game looks like so far