code to link external javascript file to html page code example
Example 1: import js in html
<script type="text/javascript" src="yourfile.js"></script>
Example 2: include script in html
<script type="text/javascript" src="/path/to/script.js"></script>
Example 3: how to include external javascript in html
<script src="script.js">
Example 4: call js script in html
<script src="file1.js" type="text/javascript"></script>
<script src="file2.js" type="text/javascript"></script>