Update the Board
Learn how to update the board.
We'll cover the following
What we have
We know the user’s input and have to place a marker on that index.
Requirements of this module
The function updateBoard()
will perform the following tasks:
- Receive three parameters:
board
,move
, andcurrentPlayer
. - Update the board by placing the marker on it.
- Assign the array’s index the user’s symbol (X or O).
Try it yourself
All the functions are already defined. You just have to implement the given function and execute the code.
Get hands-on with 1400+ tech skills courses.