Beginner JavaScript
Q18 / 100

What is an Immediately Invoked Function Expression (IIFE)?

Correct! Well done.

Incorrect.

The correct answer is C) A function defined and called immediately, creating an isolated scope

C

Correct Answer

A function defined and called immediately, creating an isolated scope

Explanation

(function() { /* code */ })() or (() => { /* code */ })() executes immediately. Used to avoid polluting global scope.

Progress
18/100