What the heck is a IIFE? JavaScript Tutorial With Bonus var/let/const!

preview_player
Показать описание
In this video I'll discus to you what JavaScript IIFE is, and how functions and scope work! Make sure to stay all the way to the end! #javascript #IIFE

-----☆-----☆-----☆-----☆-----☆-----☆-----☆-----☆-----☆-----☆

► LEARNING TO CODE? CHECK OUT THESE COURSES! (SOME ARE AFFILIATE)

► Wes Bos's Courses!

___

___

Рекомендации по теме
Комментарии
Автор

This is the best explanation of IIFEs on YouTube

abdelmananabdelrahman
Автор

IIFE, have you used it? Let me know! Any suggestions for my next video?

ProgramWithErik
Автор

This was a very nice explanation. I like classic JavaScript paradigms and think the IIFE is useful when importing packages of code. There is something about it that is timeless. I also appreciate how you showed the various ways IIFEs are written with different syntax. Thanks for the demonstration with var and let also.

busyrand
Автор

I'm not new to programming but it was a long time ago (15 years) I did anything with it. So Thank you for the refresh. I don´t even remember this one for some reason?
I caught it doing some test in LinkedIn and was dumb founded. I failed of course. Anyways, thank you.

anthnorm
Автор

I use IIFEs with pretty much everything I make. Even though I'm using ES6 modules. I wrap all my code inside an IIFE and import the module.

IsaacA
Автор

I've used them with jQuery plugins (which I no longer write) to scope the $ variable:


(function($) {
// my jquery code
})(jQuery)


More recently I've used them with await/async:


(async () => {
await someOtherFunction
})()


That's pretty much it!

chriscdn