Sep 16, 2024
.js
file and link it to the HTML.index.html
file with basic HTML structure:
<script>
tag for JavaScript code.console.log("Hello World");
script.js
file to hold the JavaScript code.<script src="script.js"></script>
script.js
:
console.log("This is a hello from external.js file");
<script src="script.js"></script>
<script>console.log("Hey again from internal script");</script>
<script>
tag for both internal and external links.