I'm puzzled by the fact that I can't access defined variables in the browser console when using type="module"
for my script.
Here's a hypothetical scenario:
<!DOCTYPE html>
<html>
<head>
<div id="containerFirst">...</div>
<div id="differentContainer">...</div>
</head;
<body>
...
</body>
<script type="module" src="module.js"></script>
<script src="normal.js"></script>
</html>
Now, here are the contents of module.js:
export const firstContainer = document.getElementById('containerFirst');
And the similar variable structure from normal.js:
const otherContainer = document.getElementById('differentContainer');
While I can directly access the variable defined in normal.js in the console, I encounter an issue with accessing the one from module.js. Any insights on this would be greatly appreciated. Thanks!