🎁 Free PDF: Senior Developer Starter Kit (Checklist + 30-Day Plan) → https://monsterlessons-academy.com/newsletter_subscribers/senior_starter_kit?utm_source=youtube&utm_medium=description_link
🚀 Go from Middle to Senior Frontend in 12 Weeks → https://monsterlessons-academy.com/courses/frontend-developer-middle-to-senior-bootcamp?utm_source=youtube&utm_medium=description_link
In this video you will learn on example the different ways of creating modules in Javascript on real examples. The first thing in Javascript was Immediately invoked function expression (IIFE) then we got CommonJS modules which are mostly used in NodeJS and the modern way is ES6 modules. Each module system has it's own pros and cons and we will compare them all to find out which one is the best
🛠 Need a video editor?
Contact Ekaterina:
[email protected]
📌 Social
Twitter: https://twitter.com/monster_lessons
Instagram: https://www.instagram.com/monsterlessonsacademy
Facebook: https://www.facebook.com/monsterlessonsacademy
Linkedin: https://www.linkedin.com/company/monsterlessons-academy
Tiktok: https://www.tiktok.com/@monsterlessonsacademy
📚 References
Source code - https://github.com/monsterlessonsacademy/monsterlessonsacademy/tree/78-require-vs-import-javascript
🕒 TIMESTAMPS
0:00 Introduction
1:44 Self executed functions
3:53 CommonJS modules
11:32 ES6 modules
18:46 Difference between CommonJS and ES6
21:04 CommonJS in NodeJS
21:44 Outro
This video is NOT sponsored. Some product links are affiliate links which means if you buy something I'll receive a small commission.