Switching Turns In JavaScript Tic-Tac-Toe?
I've got this, any ideas of how I can get the program to switch turns between players with it?
Solution 1:
Add this below your if(hasWon) clause:
var turnBtn = document.getElementById('turn');
turnBtn.value = (turnBtn.value == "X") ? "O" : "X";
Post a Comment for "Switching Turns In JavaScript Tic-Tac-Toe?"