blob: a8315ffe79acb9455f8013da79683c083c621b8e [file]
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
js> function diff(acc, val) { return acc - val; };
js> [1, 4, 9, 16].reduceRight;
function reduceRight() {
[native code]
}
js> [1, 4, 9, 16].reduceRight(diff);
2
js> Array.reduceRight;
function reduceRight() {
[native code]
}
js> Array.reduceRight([1, 4, 9, 16], diff);
2