summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js')
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
index b2cc5cbb2..8d473225b 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
@@ -9,22 +9,23 @@ description: >
accessor property on an Array
---*/
- var testResult = false;
- function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 1) {
- testResult = (prevVal === 2);
- }
- }
+var testResult = false;
- Object.defineProperty(Array.prototype, "2", {
- get: function () {
- return 2;
- },
- configurable: true
- });
+function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+}
- var arr = [0, 1, , ];
+Object.defineProperty(Array.prototype, "2", {
+ get: function() {
+ return 2;
+ },
+ configurable: true
+});
- arr.reduceRight(callbackfn);
+var arr = [0, 1, , ];
+
+arr.reduceRight(callbackfn);
assert(testResult, 'testResult !== true');