how to link javascript to html

JavaScript
<script src="index.js"></script><script src="PathToYourFile.js"> </script><script src="Your-JavaScript-File.js"></script> <!--If JS file is in same folder with HTML file--><script type="text/javascript" src="yourfile.js"></script><script src="index.js"> </script><script src = "index.js"></script>
Source

Also in JavaScript: