Last updated 2 years ago
Was this helpful?
JS โฉ module โฉ module pattern
was used as a module system before the introduction of native JavaScript modules, implemented using IIFE.
closure as object
replit๏ผmodule pattern
// โญ๏ธ object returned by IIFE // โญก // โญ โฎ โญโโโโโโโโโโโ โญ๏ธ IIFE โโโโโโโโโโโโโฎ const foo = (function() { // internal function function sayHi(name) { console.log(`Hey, my name is ${name
CommonJS
MakeUseOf โฉ An Introduction to Module Systems in JavaScript
YDKJS: Scope & Closures (v.2) > Ch. 8 > Modules