summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js')
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js54
1 files changed, 28 insertions, 26 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js
index 9d9da525a..12f468ac7 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js
@@ -9,35 +9,37 @@ description: >
iterations is observed on an Array-like object
---*/
- var preIterVisible = false;
- var obj = { length: 2 };
- var testResult = false;
+var preIterVisible = false;
+var obj = {
+ length: 2
+};
+var testResult = false;
- function callbackfn(val, idx, obj) {
- if (idx === 1) {
- testResult = (val === 9);
- }
- }
+function callbackfn(val, idx, obj) {
+ if (idx === 1) {
+ testResult = (val === 9);
+ }
+}
- Object.defineProperty(obj, "0", {
- get: function () {
- preIterVisible = true;
- return 11;
- },
- configurable: true
- });
+Object.defineProperty(obj, "0", {
+ get: function() {
+ preIterVisible = true;
+ return 11;
+ },
+ configurable: true
+});
- Object.defineProperty(obj, "1", {
- get: function () {
- if (preIterVisible) {
- return 9;
- } else {
- return 13;
- }
- },
- configurable: true
- });
+Object.defineProperty(obj, "1", {
+ get: function() {
+ if (preIterVisible) {
+ return 9;
+ } else {
+ return 13;
+ }
+ },
+ configurable: true
+});
- Array.prototype.forEach.call(obj, callbackfn);
+Array.prototype.forEach.call(obj, callbackfn);
assert(testResult, 'testResult !== true');