how to link javascript to html

JavaScript
<script src="PathToYourFile.js"> </script>
Source

Also in JavaScript: