From 9ed708d769ba64af5564ebbbe13e9c8252d6f18e Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Mon, 22 Jan 2024 00:28:59 +0700 Subject: [PATCH] fix(curriculum): allow changing order of multiplication factors in RPG - Step 128 (#53279) --- .../62a8eefe2e68b66ac563816b.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md index 97773c0dcd5..06490d9093e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8eefe2e68b66ac563816b.md @@ -22,13 +22,13 @@ assert.match(defeatMonster.toString(), /gold\s*\+=/); You should use `Math.floor()` to round the result of the monster's level times `6.7`. ```js -assert.match(defeatMonster.toString(), /Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\)/); +assert.match(defeatMonster.toString(), /(Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\))|(Math\.floor\(\s*6\.7\s*\*\s*monsters\[fighting\]\.level\s*\))/); ``` You should add the result of `Math.floor(monsters[fighting].level * 6.7)` to `gold`. ```js -assert.match(defeatMonster.toString(), /gold\s*\+=\s*Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\)/); +assert.match(defeatMonster.toString(), /gold\s*\+=\s*(Math\.floor\(\s*monsters\[fighting\]\.level\s*\*\s*6\.7\s*\))|(Math\.floor\(\s*6\.7\s*\*\s*monsters\[fighting\]\.level\s*\))/); ``` # --seed--