summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js')
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js
index 5fc0674f0..c74f302aa 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js
@@ -7,11 +7,12 @@ es5id: 15.4.4.18-5-23
description: Array.prototype.forEach - number primitive can be used as thisArg
---*/
- var result = false;
- function callbackfn(val, idx, obj) {
- result = (this.valueOf() === 101);
- }
+var result = false;
- [11].forEach(callbackfn, 101);
+function callbackfn(val, idx, obj) {
+ result = (this.valueOf() === 101);
+}
+
+[11].forEach(callbackfn, 101);
assert(result, 'result !== true');