a javascript file include code example
Example 1: how to call a script from another script in javascript
<script type="text/javascript" src="file1.js"></script>
<script type="text/javascript" src="file2.js"></script>
<script type="text/javascript">
alertOne( );
</script>
Example 2: How to add js file to a site through url
var jsFile = document.createElement("script");
jsFile.src = "homePage.js"; // it can be path also "{themes('/scripts/homePage.js')}"
document.body.appendChild(jsFile); //append it as src to body