mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Update doc examples to ES2015.
This commit is contained in:
@@ -15,11 +15,9 @@ import baseReduce from './.internal/baseReduce.js';
|
||||
* @see reduce
|
||||
* @example
|
||||
*
|
||||
* var array = [[0, 1], [2, 3], [4, 5]];
|
||||
* const array = [[0, 1], [2, 3], [4, 5]];
|
||||
*
|
||||
* reduceRight(array, function(flattened, other) {
|
||||
* return flattened.concat(other);
|
||||
* }, []);
|
||||
* reduceRight(array, (flattened, other) => flattened.concat(other), []);
|
||||
* // => [4, 5, 2, 3, 0, 1]
|
||||
*/
|
||||
function reduceRight(collection, iteratee, accumulator) {
|
||||
|
||||
Reference in New Issue
Block a user