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