diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js index bbfac7348..78d46ed7b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js @@ -10,30 +10,25 @@ description: > Array-like object ---*/ -var testResult = false; + var testResult = false; -function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } -} + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } -var obj = { - 0: 0, - 1: 111, - 4: 10, - length: 10 -}; + var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; -Object.defineProperty(obj, "4", { - get: function() { - delete obj[1]; - return 0; - }, - configurable: true -}); + Object.defineProperty(obj, "4", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); -Object.prototype[1] = 1; -Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + Object.prototype[1] = 1; + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); assert(testResult, 'testResult !== true'); |