how to refference external script within a script file code example
Example 1: linking a script .js
<script type="text/javascript" src="path-to-javascript-file.js"></script>
Example 2: include javascript in html
<script>
// JS Here
</script>
<script type="text/javascript" src="path-to-javascript-file.js"></script>
<script>
// JS Here
</script>