3 ms·
Thanks. Will definitely try to improve the code. JavaScript is not my main language and I still have many tricks that I should learn.
by pazvanti 3y ago
Thanks. Will definitely try to improve the code. JavaScript is not my main language and I still have many tricks that I should learn.
- lioeters 3y agoHere is some information about this pattern, it's called Immediately Invoked Function Expression. It's a way to create a function scope so that all variables are local, except for any that you want to "export" as a global. https://developer.mozilla.org/en-US/docs/Glossary/IIFE https://developer.mozilla.org/en-US/docs/Glossary/IIFE