I have a function declared like so;
+(function () { ... }());
Not my code, but I've been tasked with maintaining it, so knowing what's going on would be mighty handy. That's the only thing in the file, nothing else. JSHint complains with Expected an assignment or function call and instead saw an expression.
and points to the ))
as being the issue.
I've got a very basic understanding of why there's brackets around the function, although that understanding could definitely be improved. I don't know what the +
is for. Nor do I know why JSHint is complaining. Maybe the two are related?