diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js index 9d9b802d0..79eba4945 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-12.js @@ -9,24 +9,24 @@ description: > property that overrides an inherited data property on an Array ---*/ - var testResult = false; +var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } +} - Array.prototype[0] = 0; - var arr = [, 1, 2]; +Array.prototype[0] = 0; +var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - return "9"; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return "9"; + }, + configurable: true +}); - arr.reduce(callbackfn); +arr.reduce(callbackfn); assert(testResult, 'testResult !== true'); |