Use destructuring in code samples.

This commit is contained in:
John-David Dalton
2017-01-11 13:36:52 -08:00
parent d80077ed94
commit f5e7671fbc
18 changed files with 37 additions and 37 deletions

View File

@@ -22,7 +22,7 @@ const nativeMax = Math.max;
* { 'user': 'pebbles', 'active': true }
* ];
*
* findIndex(users, o => o.user == 'barney');
* findIndex(users, ({ user }) => user == 'barney');
* // => 0
*/
function findIndex(array, predicate, fromIndex) {