fix: add missing return to example in rpg project step 146 (#53890)

This commit is contained in:
a2937
2024-02-26 20:24:44 -08:00
committed by GitHub
parent 497d9792fd
commit 304a468ce1
@@ -22,7 +22,7 @@ if (score > 0) {
}
// ternary operator
score > 0 ? score : default_score
return score > 0 ? score : default_score
```
In `getMonsterAttackValue`, change `return hit` to a ternary operator that returns `hit` if `hit` is greater than `0`, or returns `0` if it is not.