var fn = function() { nowWeDance: { dance(); } };
A block is legal alone too:
(function() { { return 1; } })(); // 1
switch (x) { case 1: { // do stuff break; } case 2: { // do stuff break; } }
A block is legal alone too:
I suppose for a very long switch statement (god forbid), blocks could be useful: But I wouldn't favor it because it makes the break seem implicit to the reader when it in fact is not.