diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js index 6b68c4259..e7dfce50c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js @@ -9,16 +9,15 @@ description: > property on an Array ---*/ -var testResult = false; + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } -function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } -} + var arr = [0, 1, 2]; -var arr = [0, 1, 2]; - -arr.reduceRight(callbackfn); + arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); |