Intermediate JavaScript
Q53 / 100

What is the module pattern in JavaScript?

Correct! Well done.

Incorrect.

The correct answer is B) Using an IIFE or ES modules to encapsulate code and expose only a public API, hiding private state

B

Correct Answer

Using an IIFE or ES modules to encapsulate code and expose only a public API, hiding private state

Explanation

The module pattern uses closures to create private state. ES6 modules (import/export) provide built-in module support.

Progress
53/100