Tic Tac Toe Game [Problem Help]

Tic Tac Toe Game [Problem Help]


Hi Campers,

This is my Tic Tac Toe Project links: https://codepen.io/tanwanjern/pen/MoKQOm

Question 1: Why there is no win alert show when the computer win?

Question 2: Why computer can’t move to the last button (id=“9”)?


line 245 - you missed 1 symbol: winCondition
Q2 - did not figure out, maybe of turns array size - in JS indexes start from 0, so you need actually 10 elements in array, last of them will be number “turns[9]”


Owh…fixed it ! Thank you so much!