Travis build: 568

This commit is contained in:
30secondsofcode
2018-10-01 16:35:03 +00:00
parent a950d6a565
commit 77dfa88310
3 changed files with 7 additions and 13 deletions

View File

@ -5,7 +5,8 @@ Removes elements from the end of an array until the passed function returns `tru
Loop through the array, using a `Array.prototype.reduceRight()` and accumulating elements while the function returns falsy value.
```js
const takeRightWhile = (arr, func) => arr.reduceRight((acc, el) => func(el) ? acc : [el, ...acc], []);
const takeRightWhile = (arr, func) =>
arr.reduceRight((acc, el) => (func(el) ? acc : [el, ...acc]), []);
```
```js