blob: 1e573abce859ef19a1662087933dc69cc1be2131 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.4.4.22-10-5
description: >
Array.prototype.reduceRight reduces array in descending order of
indices(initialvalue present)
includes: [runTestCase.js]
---*/
function testcase() {
function callbackfn(prevVal, curVal, idx, obj)
{
return prevVal + curVal;
}
var srcArr = ['1','2','3','4','5'];
if(srcArr.reduceRight(callbackfn,'6') === '654321')
{
return true;
}
}
runTestCase(testcase);
|