Check out example codes for "how to add script in html head". It will help you in understanding the concepts better.
Code Example 1
<script src="script.js" defer></script>
<!--just add defer attribute so script will execute at last-->
Code Example 2
<script src="myScript.js"></script>
Code Example 3
<script type="text/javascript"
src="file.js">
</script>
Learn ReactJs, React Native from akashmittal.com