diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js index dc7dba028..57cb524bd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js @@ -9,17 +9,13 @@ description: > accumulator ---*/ -var accessed = false; + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === 12; + } -function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === 12; -} - -var obj = { - 0: 11, - length: 1 -}; + var obj = { 0: 11, length: 1 }; assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 12), true, 'Array.prototype.reduceRight.call(obj, callbackfn, 12)'); assert(accessed, 'accessed !== true'); |