Build a tic-tac-toe game with vanilla JavaScript

Tic-tac-toe is a popular two-player game that uses a 3×3 grid. The players use the symbols X and 0, and try to get three symbols in a row to win the game. Let’s build one with JavaScript!