Test migration to jest by hand
Apparently using regular expressions is way easier.
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