summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js')
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js
index 1c429e4c7..2a96496aa 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-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 = (prevVal === "0");
+ }
+ }
-function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 1) {
- testResult = (prevVal === "0");
- }
-}
-
-var str = new String("012");
-Array.prototype.reduce.call(str, callbackfn);
+ var str = new String("012");
+ Array.prototype.reduce.call(str, callbackfn);
assert(testResult, 'testResult !== true');