Permalink
Browse files
Rename Algorithm-Drop-It filename and fix Solution 3
- Loading branch information...
Showing
with
1 addition
and
1 deletion.
-
+1
−1
Algorithm-Drop-it.md → Algorithm-Drop-It.md
|
@@ -59,7 +59,7 @@ drop([1, 2, 3, 4], function(n) {return n >= 3;}); |
|
|
|
|
|
```js
|
|
|
function drop(arr, func) {
|
|
|
- while(arr.length > 0 && !func(arr[0]))
|
|
|
+ while(arr.length > 0 && !func(arr[0])) {
|
|
|
arr.shift();
|
|
|
}
|
|
|
return arr;
|
|
|
0 comments on commit
28d85c9