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

Code Example 1

<script src="PathToYourFile.js"> </script>

Code Example 2

<script src="index.js"> </script>

Code Example 3

<script type="text/javascript" 
         src="file.js">  
</script>

Code Example 4

<script src = "index.js"></script>

Code Example 5

<script src="myscripts.js"></script>

Code Example 6

<script src="index.js"> </script>

Learn ReactJs, React Native from akashmittal.com