Design Patterns · Junior · Question 14 of 75

What is the Module pattern in JavaScript?

Explanation

Modules used to be made with IIFEs and closures; now ES modules are used: everything not exported is private. This reduces coupling and protects against name collisions in the global scope.

Further reading

Problem with a question

Design Patterns · Junior · question 14

Test yourself

Take the Design Patterns · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz