Restrict Possible Usernames challenge is in the wrong place
See original GitHub issueDescribe your problem and how to reproduce it:
To solve the challenge for Restrict Possible Usernames you need to understand “quantity specifiers” (e.g. {2,}
).
Quantity specifiers aren’t taught until a few lessons later in the Curriculum (Specify upper and lower number of matches).
Suggest moving the Restrict Possible Usernames challenge a few places down the Curriculum.
Note: This is a duplicate of issue 25676, but is still ongoing.
Add a Link to the page with the problem: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames and: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches
Tell us about your browser and operating system:
- Browser Name: Mozilla Firefox
- Browser Version: 67.0.1
- Operating System: Ubuntu
If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Hi all,
I know this issue was closed but I have just hit the same wall. Unsure of how to solve the challenge, I clicked ‘Get a hint’ which lead me to a solution containing code that had yet to be taught in the curriculum. From the perspective of someone learning this material, it’s a bit of a kick in the teeth that the ‘solution’ provided is something I couldn’t possibly know just by going through the curriculum.
As quantity specifiers come later, I would suggest moving this challenge or changing the solution to an alternative method containing only expressions used so far (even if it isn’t the most elegant). Maybe:
/^[a-z][a-z]+\d*$/i;
?PS This is my first contribution here (at least I hope it is a contribution) so apologies if I’m doing it wrong!
@sultanofcardio The solution you see in the
md
file is used only by devs to test if their changes prevent the challenge from passing a solution.This topic was discussed on the forum here: https://forum.freecodecamp.org/t/restrict-possible-usernames-solution-requires-knowledge-not-introduced/395660/7
The guide post has the visible solution, and it has been updated with a perfectly suitable solution: