(tic-tac-toe) fix or-and in sentence (#5646)

* 🐛 (tic-tac-toe) fix or-and in sentence

* chore: use an just like previous para

---------

Co-authored-by: Delphine Bugner <dbugner@tf1.fr>
Co-authored-by: Strek <ssharishkumar@gmail.com>
This commit is contained in:
Delphine Bugner
2023-03-05 20:41:48 +01:00
committed by GitHub
parent c7db27bbcc
commit ba290ad4e4

View File

@@ -1410,7 +1410,7 @@ But wait, there's a problem. Try clicking on the same square multiple times:
The `X` is overwritten by an `O`! While this would add a very interesting twist to the game, we're going to stick to the original rules for now.
When you mark a square with a `X` or a `O` you aren't first checking to see if the square already has a `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has a `X` or and `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
When you mark a square with a `X` or an `O` you aren't first checking to see if the square already has a `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has a `X` or an `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
```js {2,3,4}
function handleClick(i) {