javascript how to link js to index.html code example Example: link js file to index.html <script src="your js file"></script>