I\'m trying to use setInterval in Javascript to redraw the canvas periodically. However, when I call the setInterval function, the function I pass to it only runs once. Here is
You should pass a function definition to the setInterval method, not the result of a function call.
setInterval(function() { // Do something }, 1000);
For your case,
setInterval(function() { drawCanvas(ticTacToeBoard); }, 10);