PageRenderTime 21ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/tests/javascript/javascript-generator-expression.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
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
  1. // https://developer.mozilla.org/en/New_in_JavaScript_1.8
  2. let it = (i + 3 for (i in someObj));
  3. try {
  4. while (true) {
  5. document.write(it.next() + "<br>\n");
  6. }
  7. } catch (err if err instanceof StopIteration) {
  8. document.write("End of record.<br>\n");
  9. }
  10. function handleResults( results ) {
  11. for ( let i in results )
  12. ;
  13. }
  14. handleResults( i for ( i in obj ) if ( i > 3 ) );
  15. it = (1 for(a in x) for(b in y));