I'm getting a parser error with this code: function a(){ return function(){ for(j=0;j<3;j++) { await{ b("test", defer()); } } }; } The parsing error goes away if the function isn't anonymous. Also goes away if I eliminate the for loop. Strange.