JavaScript Modules And IIFE Syntax: Does It Matter?

preview_player
Показать описание

WatchMeCode Q&A Episode 4: JavaScript Modules and Immediately Invoking Function Expression Syntax - does it matter?

There are multiple ways of creating IIFEs in JavaScript, depending on where you want to put the wrapping parenthesis vs invoking parenthesis. Does it matter which style you choose? Are there other options?

In this Q&A episode, Derick answers these questions from a reader and shows you just how flexible JavaScript is with IIFE syntax.
Рекомендации по теме
Комментарии
Автор

Thanks a lot for share this. You made it very clear, nice video

claushellsing
Автор

love the module pattern, easy to create private and public API's, I think it's a much better way than to create "classes" with prototypes but those are useful too.

tonybrown
Автор

Ever wonder about JavaScript's IIFE syntax, and whether it matters that you put the invoking () parens inside or outside of the function wrapping () parens? 

DerickBailey