blob: 9776353d220d395f37ab8d44fe1fc6b816d9415b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
description: >
Array.prototype.reduceRight - 'length' is own data property on an
Array
---*/
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
return obj.length === 2;
}
assert([12, 11].reduceRight(callbackfn, 11), '[12, 11].reduceRight(callbackfn, 11) !== true');
assert(accessed, 'accessed !== true');
reportCompare(0, 0);
|