I have a script called main.js that is attached to index.html. I have an `onclick()` function set up within index.html that needs to change the value of a variable. This question would be easy if the script was written with script tags, however, despite trying to figure it out, I'm not sure how to do it when the script is referenced via a script tag. The code isn't really relevant to the question, but here's the line anyway. 

```
<li><a href="main.html" onclick='card=thing;'>thing</a></li>

```

card is a variable in main.js which needs to be changed. In main.js, before the `onclick()` event, card is set to NULL. Thanks so much.