I found weird behavior in Javascript:
function() { return 10; }();
This design does not work in all browsers because it has a syntax error. But this construction works (ten returns):
+function() { return 10; }();
Why?
+ allows the js mechanism to make the difference between this function expression and the function definition.
+
For readability, we usually use
(function() { return 10; })();
See related article