From 1a97345aa4cd8f03f33cfdac0cc9b80c3b6dea01 Mon Sep 17 00:00:00 2001 From: "Andrew M. Yturaldi" <131637136+AndrewYturaldi@users.noreply.github.com> Date: Tue, 14 May 2024 17:18:17 -0500 Subject: [PATCH] fix(curriculum): fixed strict regex (#54778) --- .../657c9f0af0e3d61abde1c005.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-algorithmic-thinking-by-building-a-dice-game/657c9f0af0e3d61abde1c005.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-algorithmic-thinking-by-building-a-dice-game/657c9f0af0e3d61abde1c005.md index 227aca43857..2d63dcd900f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-algorithmic-thinking-by-building-a-dice-game/657c9f0af0e3d61abde1c005.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-algorithmic-thinking-by-building-a-dice-game/657c9f0af0e3d61abde1c005.md @@ -34,13 +34,13 @@ assert.match(code, /const\s+randomDice\s*=\s*.*Math\.random\s*\(\s*\)\s*\*\s*6\s You should use `Math.floor()` to round the result down to the nearest whole number. ```js -assert.match(code, /const\s+randomDice\s*=\s*Math\.floor\s*\(\s*Math\.random\s*\(\s*\)\s*\*\s*6\s*\)\s*/); +assert.match(code, /const\s+randomDice\s*=\s*Math\.floor\s*\(\(?\s*Math\.random\s*\(\s*\)\s*\*\s*6\s*\)\s*/); ``` You should add `1` to the end result of your `randomDice` variable. ```js -assert.match(code, /const\s+randomDice\s*=\s*Math\.floor\s*\(\s*Math\.random\s*\(\s*\)\s*\*\s*6\s*\)\s*\+\s*1\s*/); +assert.match(code, /const\s+randomDice\s*=\s*Math\.floor\s*\(\(?\s*Math\.random\s*\(\s*\)\s*\*\s*6\s*\)\s*\+\s*1\)?\s*/); ``` # --seed--