J
J.R.
JSLint <http://www.jslint.com> has become more and more intolerant
recently. I have been noticing changes in JSLint in the past few months.
For instance, JSLint has begun to complain about the following pattern:
(function () {
// ...
})();
JSLint outputs an error such as "Problem at line 3 character 3: Move the
invocation into the parens that contain the function.
})();"
So what is wrong with the (function () { })() pattern?
recently. I have been noticing changes in JSLint in the past few months.
For instance, JSLint has begun to complain about the following pattern:
(function () {
// ...
})();
JSLint outputs an error such as "Problem at line 3 character 3: Move the
invocation into the parens that contain the function.
})();"
So what is wrong with the (function () { })() pattern?