JavaScript · Senior · Question 36 of 75

How does top-level await in a module affect the modules that import it?

Explanation

A module with top-level await becomes an async node of the graph, and dependent modules run after it. Handy for loading configuration, but a slow await delays the whole branch of the app.

Further reading

Problem with a question

JavaScript · Senior · question 36

Test yourself

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

Take this quiz