summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js')
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js
index 987960625..a165b4820 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js
@@ -9,23 +9,27 @@ description: >
parameters (kValue is correct)
---*/
- var resultOne = false;
- var resultTwo = false;
+var resultOne = false;
+var resultTwo = false;
- function callbackfn(val, idx, obj) {
- if (idx === 0) {
- resultOne = (val === 11);
- }
+function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ resultOne = (val === 11);
+ }
- if (idx === 1) {
- resultTwo = (val === 12);
- }
+ if (idx === 1) {
+ resultTwo = (val === 12);
+ }
- }
+}
- var obj = { 0: 11, 1: 12, length: 2 };
+var obj = {
+ 0: 11,
+ 1: 12,
+ length: 2
+};
- Array.prototype.forEach.call(obj, callbackfn);
+Array.prototype.forEach.call(obj, callbackfn);
assert(resultOne, 'resultOne !== true');
assert(resultTwo, 'resultTwo !== true');