[Solved] Naughts and crosses in JavaScript [closed]
The issue with your code is that when you set the onclick property of all your cells, you actually calling the function, thus running the code within it. You don’t want this to happen as you only want it to do this when you click on a cell. So what you can do is wrap … Read more