fix(curriculum): typos in new JavaScript make an RPG game (#47862)

typos fixed
This commit is contained in:
void-hr
2022-10-06 10:26:42 +00:00
committed by GitHub
parent bbd395bf31
commit 0097b0f031
3 changed files with 5 additions and 5 deletions

View File

@@ -33,21 +33,21 @@ assert.equal(weapons[0].name, 'stick');
assert.equal(weapons[0].power, 5);
```
Your second `weapons` object should have the `name` set to `dagger` and the `power` set to 30`.
Your second `weapons` object should have the `name` set to `dagger` and the `power` set to `30`.
```js
assert.equal(weapons[1].name, 'dagger');
assert.equal(weapons[1].power, 30);
```
Your third `weapons` object should have the `name` set to `claw hammer` and the `power` set to 50.
Your third `weapons` object should have the `name` set to `claw hammer` and the `power` set to `50`.
```js
assert.equal(weapons[2].name, 'claw hammer');
assert.equal(weapons[2].power, 50);
```
Your fourth `weapons` object should have the `name` set to `sword` and the `power` set to 100.
Your fourth `weapons` object should have the `name` set to `sword` and the `power` set to `100`.
```js
assert.equal(weapons[3].name, 'sword');

View File

@@ -17,7 +17,7 @@ You should use compound assignment to increase `gold` by `15`.
assert.match(sellWeapon.toString(), /gold\s*\+=\s*15/);
```
You should set `goldText.innerText` to gold.
You should set `goldText.innerText` to `gold`.
```js
assert.match(sellWeapon.toString(), /goldText\.innerText\s*=\s*gold/);

View File

@@ -9,7 +9,7 @@ dashedName: step-108
Now you can start the code to fight monsters. To keep your code organized, your `fightDragon` function has been moved for you to be near the other `fight` functions.
Below your `weapons` array, define a `monsters` variable and assign it an array. Set that array to have three objects, each with a `name`, `level`, and `health` property. The first object's values should be `slime`, `2`, and `15`, in order. The second should be `fanged beast`, `8`, and `60`. The third should be `dragon`, `20`, and `300`.
Below your `weapons` array, define a `monsters` variable and assign it an array. Set that array to have three objects, each with a `name`, `level`, and `health` properties. The first object's values should be `slime`, `2`, and `15`, in order. The second should be `fanged beast`, `8`, and `60`. The third should be `dragon`, `20`, and `300`.
# --hints--