mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-28 23:01:57 -04:00
fix(curriculum): typos in new JavaScript make an RPG game (#47862)
typos fixed
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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/);
|
||||
|
||||
@@ -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--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user