import the link in javascript code example Example: link javascript to html <script src="index.js"> </script>