Hi,
I am two projects away from completing the back end certificate, but I just now realized I don’t know how to incorporate multiple files on client side.
Usually my client page is composed of (at least) two files:
index.html
client.js
I usually pass the client.js
file to the client page using the following line in the index.html
file:
<script src="/client.js"></script>
Now, say that I have another file utilities.js
that I want to pass to the client and this file contains the following function
function foo(){
console.log("hello World!");
}
How can I call foo from client.js
? I am using glitch, but a broader applicable answer on how to structure your app would be appreciated.
Thank you!
Michele