Changing instances of the word falsey to falsy for consistency sake, and especially as there is the array FilterFalsy function that is spelled without an e.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Returns the last element for which the provided function returns a truthy value.
|
||||
|
||||
Use `Array.prototype.filter()` to remove elements for which `fn` returns falsey values, `Array.prototype.pop()` to get the last one.
|
||||
Use `Array.prototype.filter()` to remove elements for which `fn` returns falsy values, `Array.prototype.pop()` to get the last one.
|
||||
|
||||
```js
|
||||
const findLast = (arr, fn) => arr.filter(fn).pop();
|
||||
|
||||
Reference in New Issue
Block a user