satyasootar / Tic-Tac-Toe-Game

It's a simple game made with HTML,CSS & JS
https://tic-tac-toe-satya.netlify.app
1 stars 2 forks source link

app.js restGame function #6

Open riyaayay opened 1 week ago

riyaayay commented 1 week ago

In the original code, this line appears inside the resetGame function: boxes.innerText = " "; The issue here is that boxes is a NodeList, which is like an array of all the elements with the class .box. This NodeList represents all 9 boxes in the Tic-Tac-Toe game. When you try to set boxes.innerText = " ";, you're attempting to change the innerText property of the entire NodeList, which isn't valid. Instead, the text of each individual box is needed to change. If you assign me, I can loop through each individual box (each element in the NodeList) and set the innerText for each one separately.

riyaayay commented 1 week ago

please assign me this issue