Your job is to complete this code by completing these two challenges:
Update this code to display a message when one of the players has won or when the game ends on a draw.
Update this code for player 1 to play against the computer! To do so you can either get the computer to place its token on the grid randomly, but you may also get the computer to make a decision by comparing different postions to place its token.
Click on the “Edit On CodePen” icon above to edit/complete this code. To be able to save your work on CodePen you will need to register first.