Dice Game - Step 16: regex too strict #54744
Labels
help wanted
Open for all. You do not need permission to work on these.
new javascript course
These are for issues dealing with the new JS curriculum
scope: curriculum
Lessons, Challenges, Projects and other Curricular Content in curriculum directory.
type: bug
Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Describe the Issue
Valid code will fail and give the wrong assert message about using
Math.floor
which is confusing.Expected
If you search for articles on
Math.random
you will find many of the examples has the min value inside theMath.floor
method, this includes MDN, fCC news articles, etc.Math.floor
to not depend on the rest of the code structure to avoid false positives.Tests: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-algorithmic-thinking-by-building-a-dice-game/657c9f0af0e3d61abde1c005.md
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-intermediate-algorithmic-thinking-by-building-a-dice-game/step-17
Your code
Expected behavior
Valid code should pass and not throw unrelated assert messages.
Screenshots
No response
System
Additional context
Forum: https://forum.freecodecamp.org/t/learn-intermediate-algorithmic-thinking-by-building-a-dice-game-step-17/689837
The text was updated successfully, but these errors were encountered: