Please see this fiddle. For me, it’s just a self-executing empty function:
function(){}()
Google Chrome 16.0.912.4 dev-m returns the error:
Uncaught SyntaxError: Unexpected token (
Why? This is especially strange because adding extraneous brackets will remove the error:
(function(){})()
Because a
function () {}()is not a statement as defined in ES5.1And a valid program has to be a statement.
Expression Statement.
however the following
!function () {}();is a valid statement, so is using
()and so isvar ret = function () {}()