Check out example codes for "link js file to index.html". It will help you in understanding the concepts better.

Code Example 1

<script src="Your-JavaScript-File.js"></script> <!--If JS file is in same folder with HTML file-->

Code Example 2

<script src="your js file"></script>

Learn ReactJs, React Native from akashmittal.com