diff options
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js')
-rw-r--r-- | test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js index 4f3c8f8c3..1f3da7255 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js @@ -7,12 +7,11 @@ es5id: 15.4.4.18-2-2 description: Array.prototype.forEach - 'length' is own data property on an Array ---*/ -var result = false; + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } -function callbackfn(val, idx, obj) { - result = (obj.length === 2); -} - -[12, 11].forEach(callbackfn); + [12, 11].forEach(callbackfn); assert(result, 'result !== true'); |