New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update step 74 of spreadsheet project #54327
Comments
Hi @ThornDuke ! Thank you for reporting this issue. After looking at the challenge and corresponding tests, it looks like the challenge could be restructured this way: const highPrecedence = str => {
const regex = "regex goes here"
return regex.test(str); // have them return the test of the regex against the str
} this should remove most of the regex tests and just test the final outcome. I will open this up for discussion to see what the rest of the team thinks |
Sounds good, @jdwilkin4. Any time we can test what the learners code does, instead of checking the syntax, I think we should. |
I'm not part of the "rest of the team". But I add that this structure const highPrecedence = str => {
const regex = "regex goes here"
return regex.test(str);
}
console.log(highPrecedence('some'string')) (with the reservation of eliminating unnecessary lines once the tests are finished) it would be useful
Just my two cents. |
I have opened this up for help wanted. Note to contributorsChanges to step 74For step 74, we want campers to create the regex and then return For the tests we should just focus on checking for the following:
adding a new step 75Read through the directions on how to add a new step here For the new step 75 directions, have them add this adding a new step 76For the new step 76, the directions should be to remove the |
Taking a stab at this - will follow up if any question comes up! |
Hi - I'm struggling with step 74 as well. I've tinkered with my regex based on your console prompts. With the following statement, the console no longer flags my first capture group: The freeCampCode console does, however, raise the following three issues: Your second capture group should match a * or / operator. Use a character class in the capture group. ...Leaving me with three questions about each of my capture groups. 1. The first capture group, although no longer flagged, allows for 1 or more decimal points, which is inappropriate. When I try to move the + operator like so, to specify that only digits are to be unlimited: 2. Regarding my second capture group (i.e. ([*|/])): What's the rule on escaping special characters when they're in character classes? According to the MDN regex cheatsheet, the dot operator doesn't need to be escaped in a character class: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Cheatsheet#quantifiers I've tried modifying this capture group as follows: NB: I also tried (*/) for the sake of it, but visual feedback told me this was a bad idea - everything written after the group was styled as variables would be on the freeCodeCamp interface. The console message about the second capture did not change with any of the above modifications. 3. I'm not sure why the console is flagging my third capture group, given that it's exactly the same as the first one. It suggests to me that the console is not happy with group no. 2. My work on this task is degenerating into guesswork - I'd be most grateful for your help! |
Describe the Issue
My solution meets all the challenge requests, but is rejected with incomprehensible exceptions.
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-functional-programming-by-building-a-spreadsheet/step-74
Your code
Expected behavior
My solution should pass the challenge.
Screenshots
No response
System
Additional context
Here (https://forum.freecodecamp.org/t/learn-functional-programming-by-building-a-spreadsheet-step-74/684317/3?u=sergio.am.spina) the correctness of my solution was recognized (and perhaps the incorrectness of the official solution), and here (https://forum.freecodecamp.org/t/learn-functional-programming-by-building-a-spreadsheet-step-74/684317/5?u=sergio.am.spina) it was suggested to me to open an issue.
The text was updated successfully, but these errors were encountered: