Travis build: 1447 [cron]
This commit is contained in:
6
test/takeRightWhile/takeRightWhile.js
Normal file
6
test/takeRightWhile/takeRightWhile.js
Normal file
@ -0,0 +1,6 @@
|
||||
const takeRightWhile = (arr, func) => {
|
||||
for (let i of arr.reverse().keys())
|
||||
if (func(arr[i])) return arr.reverse().slice(arr.length - i, arr.length);
|
||||
return arr;
|
||||
};
|
||||
module.exports = takeRightWhile
|
||||
Reference in New Issue
Block a user