summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js')
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js22
1 files changed, 8 insertions, 14 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js
index 351f363ff..da0debdf9 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js
@@ -9,20 +9,14 @@ description: >
property on an Array-like object
---*/
-var testResult = false;
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 0) {
+ testResult = (curVal === 0);
+ }
+ }
-function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 0) {
- testResult = (curVal === 0);
- }
-}
-
-var obj = {
- 0: 0,
- 1: 1,
- 2: 2,
- length: 2
-};
-Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
+ var obj = { 0: 0, 1: 1, 2: 2, length: 2 };
+ Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
assert(testResult, 'testResult !== true');