diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js index fa3c52c43..5024b8159 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js @@ -10,17 +10,18 @@ description: > equals number of parameters) ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } +var testResult = false; - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } +} - func(0, 1, 2); +var func = function(a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); +}; + +func(0, 1, 2); assert(testResult, 'testResult !== true'); |