diff options
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js')
-rw-r--r-- | test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js index 7ce819a4f..738c6624f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js @@ -7,16 +7,17 @@ es5id: 15.4.4.18-5-3 description: Array.prototype.forEach - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } +var res = false; +var a = new Array(); +a.res = true; +var result; - var arr = [1]; - arr.forEach(callbackfn,a) +function callbackfn(val, idx, obj) +{ + result = this.res; +} + +var arr = [1]; +arr.forEach(callbackfn, a) assert.sameValue(result, true, 'result'); |