Skip to content

Commit 6faef84

Browse files
author
rizwan.ullah
committed
Fix typo:a X or and O:an X or an O
1 parent c76a1f7 commit 6faef84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ But wait, there's a problem. Try clicking on the same square multiple times:
14061406

14071407
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.
14081408

1409-
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.
1409+
When you mark a square with an `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.
14101410

14111411
```js {2,3,4}
14121412
function handleClick(i) {
@@ -1556,7 +1556,7 @@ It does not matter whether you define `calculateWinner` before or after the `Boa
15561556

15571557
</Note>
15581558

1559-
You will call `calculateWinner(squares)` in the `Board` component's `handleClick` function to check if a player has won. You can perform this check at the same time you check if a user has clicked a square that already has a `X` or and `O`. We'd like to return early in both cases:
1559+
You will call `calculateWinner(squares)` in the `Board` component's `handleClick` function to check if a player has won. You can perform this check at the same time you check if a user has clicked a square that already has an `X` or an `O`. We'd like to return early in both cases:
15601560

15611561
```js {2}
15621562
function handleClick(i) {

0 commit comments

Comments
 (0)