Can i get the variables declared in HTML script tag to the source file script.js and link both in if module
HTML
<script type="module" src="script.js">
let mystatement = '34'
</script>
In script.js
console.log(mystatement)
or link both files.
HTML
<script type="module" src="script.js">
myfun(7)
</script>
In script.js
let myfun = (a) =>{ return a}
console.log(mystatement)