Skip to content

Commit 5a96430

Browse files
author
Sascha
committed
added the IIFE example as a stretchgoal
1 parent dd5d4be commit 5a96430

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎assignments/iife-example.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// IIFE stands for Immediately Invoked Function Expression
2+
//It does not get invoked, only referenced thus you don't need the () after the reference
3+
//you can reference to this function alone by its name
4+
let greet = (() => 'Hello, my name is Sascha!')();
5+
6+
console.log(greet);
7+

0 commit comments

Comments
 (0)