arr, iterate through and remove each element starting from the first element (the 0 index) until the function func returns true when the iterated element is passed through it.
Then return the rest of the array once the condition is satisfied, otherwise, arr should be returned as an empty array.
Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.
dropElements([1, 2, 3, 4], function(n) {return n >= 3;}) should return [3, 4].'
testString: 'assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n >= 3;}), [3, 4], "dropElements([1, 2, 3, 4], function(n) {return n >= 3;}) should return [3, 4].");'
- text: 'dropElements([0, 1, 0, 1], function(n) {return n === 1;}) should return [1, 0, 1].'
testString: 'assert.deepEqual(dropElements([0, 1, 0, 1], function(n) {return n === 1;}), [1, 0, 1], "dropElements([0, 1, 0, 1], function(n) {return n === 1;}) should return [1, 0, 1].");'
- text: 'dropElements([1, 2, 3], function(n) {return n > 0;}) should return [1, 2, 3].'
testString: 'assert.deepEqual(dropElements([1, 2, 3], function(n) {return n > 0;}), [1, 2, 3], "dropElements([1, 2, 3], function(n) {return n > 0;}) should return [1, 2, 3].");'
- text: 'dropElements([1, 2, 3, 4], function(n) {return n > 5;}) should return [].'
testString: 'assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n > 5;}), [], "dropElements([1, 2, 3, 4], function(n) {return n > 5;}) should return [].");'
- text: 'dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;}) should return [7, 4].'
testString: 'assert.deepEqual(dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;}), [7, 4], "dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;}) should return [7, 4].");'
- text: 'dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}) should return [3, 9, 2].'
testString: 'assert.deepEqual(dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}), [3, 9, 2], "dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}) should return [3, 9, 2].");'
```