Formatting changes

This commit is contained in:
Angelos Chalaris
2018-09-27 22:47:46 +03:00
parent b44b539b40
commit e97fdf2682
14 changed files with 22 additions and 15 deletions

View File

@@ -1,8 +1,10 @@
### findLastKey
Returns the last key that satisfies the provided testing function. Otherwise `undefined` is returned.
Returns the last key that satisfies the provided testing function.
Otherwise `undefined` is returned.
Use `Object.keys(obj)` to get all the properties of the object, `Array.reverse()` to reverse their order and `Array.find()` to test the provided function for each key-value pair. The callback receives three arguments - the value, the key and the object.
Use `Object.keys(obj)` to get all the properties of the object, `Array.reverse()` to reverse their order and `Array.find()` to test the provided function for each key-value pair.
The callback receives three arguments - the value, the key and the object.
```js
const findLastKey = (obj, fn) =>