NA +91-8727899942 thecoderjob@gmail.com

CHAPTER - 5

What is IIFE function in javascript?

It is a common pattern in JavaScript where a function is defined and executed

immediately after its creation. The main purpose of using IIFE is to create a

private scope for variables, preventing them from polluting the global scope.

Here's is the Code !!

// Neel.B
(function(data){
	console.log(data)
})('Hi this is IIFE')
// Output : Hi this is IIFE

Chapter 4

Clouser function in javascript || encapsulate the outer function variables.

Previous chapter

Chapter 6

Behavior of this keyword in javascript.

Next chapter

Get In Touch

NA

thecoderjob@gmail.com

+91-8727899942

Popular Links

© www.thecoderjob.com. All Rights Reserved.               Designed by HTML Codex