<script type="text/javascript" src="index.js" defer></script> // makes sure the script fill is loaded after the DOM