diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md index 4210b69f7a8..eab419f9b0a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa226207f33d3ad4c6f546.md @@ -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/);