Code skill Working Out the Winner

Give each box on the board an id attribute and set it to the coordinate that represents the box’s position on the board. Use getElementById and two if statements to see if a player has got three-in-a-row.

See the Pen M1 GB5 by Walker Books UK (@walkerbooks) on CodePen.