Implement a function dropWhile(array, predicate) that removes elements from the beginning of an array until the predicate returns false.
array: The array to iterate over.predicate: A function invoked with each element, index, and the whole array. Stop dropping when predicate returns false.Example
dropWhile([1, 2, 3, 4], n => n < 3); // [3, 4] dropWhile([1, 2, 3, 4], n => n > 0); // []
JavaScript Function
No test results yet
Click "Run" to execute tests