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

Code Example 1

<script type="text/javascript" src="./der/pfad/zu/der/datei.js"></script>

Learn ReactJs, React Native from akashmittal.com