head-init-async-of.js (441B)
1 // Copyright (C) 2021 Kevin Gibbons. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: for statement beginning with `async of` 6 info: | 7 `for (async of =>` is the begining of a regular for loop, rather than a for-of 8 esid: sec-for-statement 9 ---*/ 10 11 var i = 0; 12 var counter = 0; 13 for (async of => {}; i < 10; ++i) { 14 ++counter; 15 } 16 assert.sameValue(counter, 10); 17 18 reportCompare(0, 0);