javascript-tutorial / javascript-tutorial/en.javascript.info
Array methods [Tasks] Filter range "in place" typo
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
(The page in question)
### [Filter range "in place"]
> Write a function filterRangeInPlace(arr, a, b) that gets an array arr and removes from it all values except those that are between a and b. The test is: a ≤ arr[i] ≤ b.
the 'between' in task description implies excluding numbers 1 and 4 so only 2 and 3 should be valid.
`let arr = [5, 3, 8, 1];`
`filterRangeInPlace(arr, 1, 4); // removed the numbers except from 1 to 4`
`alert( arr ); // [3, 1]`
Yet here we have 1 along with 3. The answer is also same as previous task filterRange. Please fix the wording or use an && operator in the solution.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Array methods page and the “Filter range "in place"” task, including its example and answer. Check the wording and solution against the stated inclusive test a ≤ arr[i] ≤ b; done when the task, example, and answer consistently describe the intended range behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100