From 874651413a77aec856b627edbb5d5a319608a645 Mon Sep 17 00:00:00 2001 From: Hatim Zahid <63000127+HatimZ@users.noreply.github.com> Date: Sun, 23 Oct 2022 01:55:59 -0700 Subject: [PATCH] fix(curriculum): Added description texts about spaces in step 154 #48160 (#48196) * 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 * 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 Co-authored-by: Ilenia --- .../62aa226207f33d3ad4c6f546.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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/);