summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js')
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js
index 388685e91..83976643c 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js
@@ -9,15 +9,14 @@ description: >
implements its own property get method
---*/
-var testResult = false;
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === "1");
+ }
+ }
-function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 1) {
- testResult = (curVal === "1");
- }
-}
-
-var str = new String("012");
-Array.prototype.reduceRight.call(str, callbackfn, "initialValue");
+ var str = new String("012");
+ Array.prototype.reduceRight.call(str, callbackfn, "initialValue");
assert(testResult, 'testResult !== true');