Relative Content

Tag Archive for javascriptif-statement

I have created Tic-Tac-Toe game. There is a problem I’m facing is whenever the game was draw it prints the score value 2 while it should print 1

I have created Tic Tac Toe Game. I am tracking the game score whenever the game was draw or win, there is a problem I’m facing is whenever the game was draw it prints the score value 2 while it should print 1. I think the problem is in the else statement, it runs two times.I have tried many ways but it couldn’t solve. How can I solve this problem?