mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
* fix(curriculum): Added description texts about spaces in step 154 #48160 * fix(curriculum): Added description texts about spaces in step 154 #48160 Used the text as described in #48087 (comment). * fix(curriculum): Added description texts about spaces in step 154 #48160 * Update curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md Removed Space in front of Your, as to not confuse future contributors. Co-authored-by: Ilenia <nethleen@gmail.com> * Update curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md Removed space warming text to make description less verbose. Co-authored-by: Ilenia <nethleen@gmail.com> Co-authored-by: Ilenia <nethleen@gmail.com>
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ dashedName: step-154
|
||||
|
||||
# --description--
|
||||
|
||||
Use the `+=` operator to add ` Your [weapon] breaks.` to the end of `text.innerText`, replacing `weapon` with the last item in the `inventory` array. You can get this last item by using `inventory.pop()`, which will remove the last item in the array AND return it so it appears in your string.
|
||||
Use the `+=` operator to add `Your [weapon] breaks.`, with a space in front of `Your`, to the end of `text.innerText`. Replace `[weapon]` with the last item in the `inventory` array using `inventory.pop()`, which will remove the last item in the array AND return it so it appears in your string.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -24,7 +24,7 @@ You should use the `pop` method on the `inventory` array.
|
||||
assert.match(attack.toString(), /inventory\.pop\(\)/);
|
||||
```
|
||||
|
||||
You should add the string " Your " to `text.innerText`. Remember that spacing matters.
|
||||
You should add `Your`, with a space before and after it, to `text.innerText`.
|
||||
|
||||
```js
|
||||
assert.match(attack.toString(), /text\.innerText\s*\+=\s*('|")\sYour\s\1/);
|
||||
@@ -37,7 +37,7 @@ console.log(attack.toString());
|
||||
assert.match(attack.toString(), /text\.innerText\s*\+=\s*('|")\sYour\s\1\s*\+\s*inventory\.pop\(\)/);
|
||||
```
|
||||
|
||||
You should add ` breaks.` to the ` "Your " + inventory.pop()` string.
|
||||
You should add `breaks.`, with a space in front of it, to the end of your string.
|
||||
|
||||
```js
|
||||
assert.match(attack.toString(), /text\.innerText\s*\+=\s*('|")\sYour\s\1\s*\+\s*inventory\.pop\(\)\s*\+\s*('|")\sbreaks\.\2/);
|
||||
|
||||
Reference in New Issue
Block a user