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