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

@@ -14,7 +14,7 @@ import baseSum from './.internal/baseSum.js';
*
* const objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* sumBy(objects, o => o.n);
* sumBy(objects, ({ n }) => n);
* // => 20
*/
function sumBy(array, iteratee) {