fix(curriculum): remove backticks around "ternary operator" (#55996)

pull/56002/head
Cole Aydelotte 2024-09-04 03:39:21 -04:00 committed by GitHub
parent 838f30e2be
commit c968c184d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ dashedName: step-149
If you play the game in its current state you might notice a bug. If your `xp` is high enough, the `getMonsterAttackValue` function will return a negative number, which will actually add to your total health when fighting a monster! You can fix this issue by using a <dfn>ternary operator</dfn> to ensure negative values are not returned.
The `ternary operator` is a conditional operator and can be used as a one-line `if-else` statement. The syntax is: `condition ? expressionIfTrue : expressionIfFalse`.
The ternary operator is a conditional operator and can be used as a one-line `if-else` statement. The syntax is: `condition ? expressionIfTrue : expressionIfFalse`.
Here is an example of returning a value using an `if-else` statement and a refactored example using a ternary operator: