Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
iliakan committed Jun 3, 2017
1 parent 99fb90e commit 90aa323
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ importance: 4

---

# Filter "in place"
# 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`.
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 function should only modify the array. It should not return anything.

Expand All @@ -16,4 +16,3 @@ filterRangeInPlace(arr, 1, 4); // removed the numbers except from 1 to 4

alert( arr ); // [3, 1]
```

0 comments on commit 90aa323

Please sign in to comment.