1 | ;
|
2 | var $ = require('../internals/export');
|
3 | var $reduceRight = require('../internals/array-reduce').right;
|
4 | var sloppyArrayMethod = require('../internals/sloppy-array-method');
|
5 |
|
6 | // `Array.prototype.reduceRight` method
|
7 | // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
8 | $({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduceRight') }, {
|
9 | reduceRight: function reduceRight(callbackfn /* , initialValue */) {
|
10 | return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
11 | }
|
12 | });
|