diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js index 7413e3140..4be07578a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js @@ -9,20 +9,21 @@ description: > accessor property without a get function on an Array ---*/ - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } +var testResult = false; - var arr = [0, 1]; +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } +} - Object.defineProperty(arr, "2", { - set: function () { }, - configurable: true - }); +var arr = [0, 1]; - arr.reduceRight(callbackfn); +Object.defineProperty(arr, "2", { + set: function() {}, + configurable: true +}); + +arr.reduceRight(callbackfn); assert(testResult, 'testResult !== true'); |