summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js')
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js
index 70fc43629..9759f019a 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-13.js
@@ -7,13 +7,14 @@ es5id: 15.4.4.18-1-13
description: Array.prototype.forEach applied to the JSON object
---*/
- var result = false;
- function callbackfn(val, idx, obj) {
- result = ('[object JSON]' === Object.prototype.toString.call(obj));
- }
+var result = false;
- JSON.length = 1;
- JSON[0] = 1;
- Array.prototype.forEach.call(JSON, callbackfn);
+function callbackfn(val, idx, obj) {
+ result = ('[object JSON]' === Object.prototype.toString.call(obj));
+}
+
+JSON.length = 1;
+JSON[0] = 1;
+Array.prototype.forEach.call(JSON, callbackfn);
assert(result, 'result !== true');