2

Possible Duplicate:
What does the exclamation mark do before the function?

I saw this in bootstrap-dropdown.js

!function ($) {
   "use strict"; // jshint ;_;
   ...
}(window.jQuery);

what is the reason behind this bang (negation) before immediate anonymous function invocation?

Community
  • 1
  • 1
jcubic
  • 61,973
  • 54
  • 229
  • 402
  • So it executes, otherwise it's just a function declaration. -- See also http://stackoverflow.com/questions/3755606/what-does-the-exclamation-mark-do-before-the-function – Brad Christie Apr 30 '12 at 15:52

0 Answers0