summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js')
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js
index c6cfe25cd..4b716884f 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js
@@ -10,17 +10,18 @@ description: >
is greater than number of parameters)
---*/
- var testResult = false;
- function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 2) {
- testResult = (prevVal === 3);
- }
- }
+var testResult = false;
- var func = function (a, b, c) {
- Array.prototype.reduceRight.call(arguments, callbackfn);
- };
+function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2) {
+ testResult = (prevVal === 3);
+ }
+}
- func(0, 1, 2, 3);
+var func = function(a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn);
+};
+
+func(0, 1, 2, 3);
assert(testResult, 'testResult !== true');