JavaScript files can be created with the extension .js
Note that an accompanying HTML file must reference it in order
for it to run as JavaScript. You can include the file in your HTML
document by adding the following to the head or body of the
document:
<script type="text/javascript"
src="myJavaScriptFile.js"></script>
Replace myJavaScriptFile.js with the file name of your
JavaScript file.