5

Possible Duplicate:
Location of parenthesis for auto-executing anonymous JavaScript functions?

The answer might be a simple no but I'm just curious.

I've seen self executing functions written as

(function() {
//...
}());

and

(function() {
//...
})();

where the parenthesis containing the function is closed before it is called. Both seem to have exactly the same effect so I just wondered if there might be any difference in performance?

Community
  • 1
  • 1
mattholl
  • 180
  • 1
  • 11

0 Answers0