Help with Tic Tac Toe--Reset and assigning X or O

Hi, I have struggled a lot to build this tic tac toe game. I still have a problem with toggling between X and O. I tried and tried …could not do it. I still need to clean my code a lot.

suggestions and/or help are welcom

Hi venkyafhs! First I just gotta say, your animations are amazing!
What I did to reset the board is that I assigned a class (either x or o) to the nine squares (so if the square #1 is taken by x, the class would be x, and if it is blank, there would be no class). I set it so that if the square has a class of x (or o), it would mark the box with the same symbol. And when you click the reset button, it removes the class from each box, and updates it so all the boxes are clear.

Thanks!!! Still working on my toggle function between X and O. Still need to clean my code. It looks weird.