/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/tests/javascript/javascript-generator-expression.js
JavaScript | 18 lines | 14 code | 3 blank | 1 comment | 8 complexity | 24eff5bc570ff81cbfcfb0cb6e4c2447 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
- // https://developer.mozilla.org/en/New_in_JavaScript_1.8
- let it = (i + 3 for (i in someObj));
- try {
- while (true) {
- document.write(it.next() + "<br>\n");
- }
- } catch (err if err instanceof StopIteration) {
- document.write("End of record.<br>\n");
- }
- function handleResults( results ) {
- for ( let i in results )
- ;
- }
- handleResults( i for ( i in obj ) if ( i > 3 ) );
- it = (1 for(a in x) for(b in y));