0

I see in the jQuery code this structure but I don't know the name and how use correctly.

(function($) {
    ...
})(jQuery);

I suppose it's a form of past arguments to the function.

GrumpyCrouton
  • 7,816
  • 5
  • 27
  • 61
  • 1
    Immediately-invoked function expression (IIFE) https://developer.mozilla.org/en-US/docs/Glossary/IIFE – Satpal Jan 23 '18 at 16:39
  • It's called a module pattern. Read all about it here: http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html – Hielke Walinga Jan 23 '18 at 16:43

1 Answers1

0

this will execute the function immediately (immediately invoked)

XPX-Gloom
  • 561
  • 4
  • 11