Question 13
Back to Exercise
Which statement about ES modules is true?
- A Their top-level var declarations become global
- B They can be loaded with a plain <script> tag without type="module"
- C They run before the HTML is parsed
- D They always run in strict mode and have their own top-level scope Correct
Correct Answer: Option D
Modules are strict, have module scope, are deferred by default in browsers and are evaluated once even if imported many times.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!