Skip to content

Commit c968c18

Browse files
fix(curriculum): remove backticks around "ternary operator" (freeCodeCamp#55996)
1 parent 838f30e commit c968c18

File tree

1 file changed

+1
-1
lines changed
  • curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game

1 file changed

+1
-1
lines changed

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1eec891ed731db227a36.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dashedName: step-149
99

1010
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.
1111

12-
The `ternary operator` is a conditional operator and can be used as a one-line `if-else` statement. The syntax is: `condition ? expressionIfTrue : expressionIfFalse`.
12+
The ternary operator is a conditional operator and can be used as a one-line `if-else` statement. The syntax is: `condition ? expressionIfTrue : expressionIfFalse`.
1313

1414
Here is an example of returning a value using an `if-else` statement and a refactored example using a ternary operator:
1515

0 commit comments

Comments
 (0)