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

pull/53896/head
a2937 2024-02-26 23:24:44 -05:00 committed by GitHub
parent 497d9792fd
commit 304a468ce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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.