Skip to content

Commit cdd9a06

Browse files
authored
Merge pull request #145 from MilanGrujicic/bug_01_build_tic_tac_toe_with_javascript_typo
Proposal of fix to a typo in building tic-tac-toe with javascript project.
2 parents 76589d7 + 1aa5ba8 commit cdd9a06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/build-tic-tac-toe-with-javascript/build-tic-tac-toe-with-javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ In the real game, when all the cells are filled without there being a winner, it
177177

178178
The `handleMove()` function runs every time a player makes a move, so after one player's move, we need to switch to the next player. This can be done by checking if the `currentPlayer` variable is equal to ‘🐐’, and if the condition is true it will be swapped out by `🍇`, and vice versa. In other words, we are toggling `currentPlayer` between `🐐` and `🍇` after every move by replacing the variable with it's alternative.
179179

180-
We'll use a [ternerary operator](https://www.codedex.io/javascript/bonus/ternary-operators-in-javascript) to do this, which is a shorthand for an `if`/`else` statement.
180+
We'll use a [ternary operator](https://www.codedex.io/javascript/bonus/ternary-operators-in-javascript) to do this, which is a shorthand for an `if`/`else` statement.
181181

182182
```js
183183
currentPlayer = currentPlayer === "🐐" ? "🍇" : "🐐";

0 commit comments

Comments
 (0)