I have in my HTML file:
<script type="text/javascript">
var a=2;
</script>
<script src=".../abc.js"/>
What I want to do: inside the abc.js file I want to access the variable a:
#...inside abc.js
function bar(){
return a; //How?
}
Is this possible/reasonable? No matter how I rephrase my question, I got answers that worked for the other way round, i.e. accessing the external abc.js from within an HTML file...