DEV Community

loading...

Discussion on: #8) What is IIFE in JavaScript🐱‍👤

Collapse
franckpaul profile image
Franck Paul

Hi,

Is ( function() {}) (); the same as (() => {}) (); ?

Collapse
myk profile image
Mayank Yadav Author

Yes, it is same but using Arrow function is much more shorter and easier to write as compared to old ES5.
🚀Thanks for your comments, I really appreciate it.