diff options
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js')
-rw-r--r-- | test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js index 3f7fa9349..8b29f06da 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js @@ -9,23 +9,27 @@ description: > parameters (the index k is correct) ---*/ - var resultOne = false; - var resultTwo = false; +var resultOne = false; +var resultTwo = false; - function callbackfn(val, idx, obj) { - if (val === 11) { - resultOne = (idx === 0); - } +function callbackfn(val, idx, obj) { + if (val === 11) { + resultOne = (idx === 0); + } - if (val === 12) { - resultTwo = (idx === 1); - } + if (val === 12) { + resultTwo = (idx === 1); + } - } +} - 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'); |