fix(curriculum): update directions and hint text for step 117 of RPG game (#53518)

This commit is contained in:
ITS MAC
2024-02-04 21:40:07 +06:00
committed by GitHub
parent e48bf5d59d
commit 780cad469b
@@ -7,7 +7,9 @@ dashedName: step-117
# --description--
Now, set the `innerText` property of `monsterName` to be the `name` property of the current monster. Do the same for `monsterHealthText` and the `health` property.
Now, you will need to update the text for the current monster's name and health.
Start by assigning `monsters[fighting].name` to the `innerText` property of `monsterName`. Then, assign `monsterHealth` to the `innerText` property of `monsterHealthText`.
# --hints--
@@ -17,7 +19,7 @@ You should use dot notation to access the `innerText` property of `monsterName`.
assert.match(goFight.toString(), /monsterName\.innerText/);
```
You should set the `innerText` property of `monsterName` to be the `name` value of the current monster. Remember that you can get the current monster with `monsters[fighting]`.
You should assign `monsters[fighting].name` to `monsterName.innerText`.
```js
assert.match(goFight.toString(), /monsterName\.innerText\s*=\s*monsters\s*\[\s*fighting\s*\]\s*\.name/);
@@ -29,7 +31,7 @@ You should use dot notation to access the `innerText` property of `monsterHealth
assert.match(goFight.toString(), /monsterHealthText\.innerText/);
```
You should set the `innerText` property of `monsterHealthText` to be the `health` value of the current monster. You can get the current monster with `monsters[fighting]` or you can access this value using the `monsterHealth` variable that you previously assigned.
You should assign `monsterHealth` to `monsterHealthText.innerText`.
```js
assert.match(goFight.toString(), /monsterHealthText\.innerText\s*=\s*monsterHealth|monsterHealthText\.innerText\s*=\s*monsters\s*\[\s*fighting\s*\]\s*\.health/);