Just some cleanup to do.
We want the Reset button to set everything back to the beginning.
So we can set it to run the same function that we run when the page is loaded.
We need to add code to the setup() function to clear the board spaces.
Note that in the for loop in setup() that sets the spaces,
we didn't use a variable to hold the reference to the object.
There is code there like this:
document.getElementById("b"+i).innerHTML=" ";
This is equivalent, but shorter than
var pos = document.getElementById("b"+i)
pos.innerHTML=" ";
The phrase document.getElementById("b"+i) results in an object reference
so we can put the .innerHTML right after it and save a variable.