diff options
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js')
-rw-r--r-- | test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js index a3258cbd5..c63d80321 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js @@ -9,20 +9,22 @@ description: > property without a get function on an Array-like object ---*/ - var testResult = false; +var testResult = false; - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Array.prototype.forEach.call(obj, callbackfn); +Array.prototype.forEach.call(obj, callbackfn); assert(testResult, 'testResult !== true'); |