The following doesn\'t work as I would expect it to:
function test()
{
// Returns undefined, even though I thought it would return 1
return
1;
}
It's explicitly part of the language spec. If it were not, there would still be return issues:
if (something()) return
counter = counter + 1;
Without the semicolon insertion rule, that missing semicolon would trigger behavior that's (I'd argue) just as bizarre as what happens now with return statements split across a newline.