Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20c7951

Browse files
committed
IIFE
1 parent acdff19 commit 20c7951

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

03_basics/IIFE.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//Immediately Invoked Function Expression --IIFE
2+
3+
// ()()
4+
(function chai() {
5+
//named IIFE
6+
let name = "waseem akram ";
7+
console.log(name);
8+
})();
9+
10+
((best) => {
11+
console.log("hello everyone");
12+
console.log(`${best}, this is my favourite social media `);
13+
})("instagram");
14+
15+
16+
//-------------Important----------
17+
// used for avoding the global variable pollutioning ....

0 commit comments

Comments
 (0)