A self-invoking function, also known as an Immediately Invoked Function Expression (IIFE), is a JavaScript function that runs automatically as soon as it's defined. This pattern is commonly used for creating a private scope, preventing variable name clashes, and managing dependencies. example of how to write IIFE
`(function(){
console.log("Hello, I am self Involving function")
})();`
things to note:
- IIFE are wrapped in ()
- IIFE ends with a full ()
Top comments (0)