diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js index d21d758ac..d74fd82f5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js @@ -9,31 +9,29 @@ description: > visited on an Array-like object ---*/ -var testResult = false; + var testResult = false; -function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0 && curVal === 0) { - testResult = true; - } -} + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0 && curVal === 0) { + testResult = true; + } + } -var obj = { - length: 2 -}; + var obj = { length: 2 }; -Object.defineProperty(obj, "1", { - get: function() { - Object.defineProperty(obj, "0", { - get: function() { - return 0; - }, - configurable: true - }); - return 1; - }, - configurable: true -}); + Object.defineProperty(obj, "1", { + get: function () { + Object.defineProperty(obj, "0", { + get: function () { + return 0; + }, + configurable: true + }); + return 1; + }, + configurable: true + }); -Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); |