Skip to content

Commit 3e15351

Browse files
committed
IIFE in JS
1 parent 75c4ef5 commit 3e15351

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js_functions/iife.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Immediately Invoked Function Expression (IIFE)
2+
3+
(function biscuit() {
4+
console.log("DB CONNECTED");
5+
})();
6+
7+
// IIFE with arrow function
8+
((name) => {
9+
console.log(`DB CONNECTED TWO ${name}`);
10+
})("henry");

0 commit comments

Comments
 (0)