summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js')
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
index 3f591f26e..fc4013d2d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
@@ -10,19 +10,20 @@ description: >
greater than number of parameters)
---*/
- var testResult = false;
- function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 3) {
- testResult = (prevVal === 2);
- }
- }
+var testResult = false;
- var func = function (a, b, c) {
- delete arguments[0];
- delete arguments[1];
- Array.prototype.reduce.call(arguments, callbackfn);
- };
+function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 3) {
+ testResult = (prevVal === 2);
+ }
+}
- func(0, 1, 2, 3);
+var func = function(a, b, c) {
+ delete arguments[0];
+ delete arguments[1];
+ Array.prototype.reduce.call(arguments, callbackfn);
+};
+
+func(0, 1, 2, 3);
assert(testResult, 'testResult !== true');