mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Update doc examples to ES2015.
This commit is contained in:
4
maxBy.js
4
maxBy.js
@@ -13,9 +13,9 @@ import baseGt from './.internal/baseGt.js';
|
||||
* @returns {*} Returns the maximum value.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
* const objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
*
|
||||
* maxBy(objects, function(o) { return o.n; });
|
||||
* maxBy(objects, o => o.n);
|
||||
* // => { 'n': 2 }
|
||||
*/
|
||||
function maxBy(array, iteratee) {
|
||||
|
||||
Reference in New Issue
Block a user