- Another alternative is to add a full website URL that contains a js file called myScript.js: <script src=" myScript.js"></script>
- The js file can be inside a folder called js : <script src="/js/myScript.js"></script>
- We can also add a full website URL that contains a js file called myScript.js <script src="https://www.selfmadetechie.com/js/myScript.js"></script>
Are you wondering which method you should use?
It’s simple question. Well, I advise you to alter between the 2 methods: use the internal method if the script is short, otherwise separate it in another file.