Travis build: 1447 [cron]
This commit is contained in:
5
test/dropRightWhile/dropRightWhile.js
Normal file
5
test/dropRightWhile/dropRightWhile.js
Normal file
@ -0,0 +1,5 @@
|
||||
const dropRightWhile = (arr, func) => {
|
||||
while (arr.length > 0 && !func(arr[arr.length - 1])) arr = arr.slice(0, -1);
|
||||
return arr;
|
||||
};
|
||||
module.exports = dropRightWhile
|
||||
Reference in New Issue
Block a user