TheOdinProject / javascript-exercises

MIT License
1.18k stars 30.27k forks source link

09_palindromes: Replace regex solution with non-regex version #438

Closed MaoShizhong closed 3 months ago

MaoShizhong commented 3 months ago

Because

319 replaced the regex solution for the palindromes exercise with a non-regex solution, which definitely was the right move given the context of the curriculum at that point as well as regular gripes in the community from learners who get hit in the face with a regex brick wall upon seeing the solution. However, this was only reflected in the solutions branch and not in the main branch.

Since then, changes to the main branch's solutions test file have not been reflected in the solutions branch and it seems this branch is no longer in use/being updated; learners are also unlikely to be aware of this branch and will just use the solutions directory from the main branch.

This PR

Issue

N/A

Additional Information

Proof that the new solution passes all current tests in the main branch: ![Palindromes non-regex solution and test results](https://i.ibb.co/tP5ymgy/20240229-185732-screenshot.jpg)

Pull Request Requirements