Answer & Solution
Answer: Option D
Solution:
Avoiding global scope pollution can be achieved by using local variables, IIFE, and modules.
typeof window
in a browser environment?
console.log(globalThis === window);
in a browser environment?