diff --git a/index.html b/index.html
index 4c7b93e..8b52f8c 100644
--- a/index.html
+++ b/index.html
@@ -167,10 +167,11 @@
Tic Tac Toe
div.style.padding = "5px";
document.querySelector("body").insertBefore(div, document.querySelector("#restartButton"));
-div.addEventListener('click', ()=>{
- if(arr.length != 0){
- let val = arr.pop();
- val.innerText = "";
+div.addEventListener('click', () => {
+ if (arr.length != 0) {
+ let cell = arr.pop();
+ cell.innerText = "";
+ val= changeval(val);
}
});