summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js')
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
index 9363a9c3b..2bf4cc00d 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
@@ -9,15 +9,14 @@ description: >
property that overrides an inherited data property on an Array
---*/
-var testResult = false;
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
-function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 1) {
- testResult = (prevVal === 2);
- }
-}
-
-Array.prototype[2] = "11";
-[0, 1, 2].reduceRight(callbackfn);
+ Array.prototype[2] = "11";
+ [0, 1, 2].reduceRight(callbackfn);
assert(testResult, 'testResult !== true');