1

I am trying to access some variables (of script.js) on chrome's console. I'm able to do so only until I turn my script.js into a module (type="module") in index.html. If i try to access any variable when i have type=module on my script tag, i get the following error:

Uncaught ReferenceError: variable_name is not defined at <anonymous>:1:1

<script type="module" src="./script.js"></script>
Yogesh Bhatt
  • 127
  • 2
  • 9

0 Answers0