04_removeFromArrray: missing test case - #432
Merged
Merged
Conversation
CouchofTomato
approved these changes
Feb 5, 2024
Oussama5379
added a commit
to Oussama5379/javascript-exercises
that referenced
this pull request
Feb 1, 2025
04_removeFromArrray: missing test case
painooo
pushed a commit
to painooo/javascript-exercises
that referenced
this pull request
Dec 29, 2025
04_removeFromArrray: missing test case
Paodpdro
pushed a commit
to Paodpdro/javascript-exercises
that referenced
this pull request
May 19, 2026
04_removeFromArrray: missing test case
FredTheJanitor
pushed a commit
to FredTheJanitor/javascript-exercises
that referenced
this pull request
May 29, 2026
04_removeFromArrray: missing test case
FredTheJanitor
pushed a commit
to FredTheJanitor/javascript-exercises
that referenced
this pull request
May 29, 2026
04_removeFromArrray: missing test case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
A learner popped into discord to show off their code that passed all the tests. It used the
splicetechnique many learners go for. This creates a problem for most learners for the test that removes all elements, since splicing changes the indexing and they will skip over some elements. However this particular learner had nested loops for the rest parameter and the source array, so this problem would only show itself if there were two adjacent entries of the same value to be removed.This PR
Adds a test case to catch that scenario
Additional Information
https://discord.com/channels/505093832157691914/1179952911548174346/1203859773611843625
Pull Request Requirements
location of change: brief description of changeformat, e.g.01_helloWorld: Update test casesBecausesection summarizes the reason for this PRThis PRsection has a bullet point list describing the changes in this PRIssuesection/solutionsfolder