run javascript in html code example
Example 1: javascript hello world
console.log("Hello World!");
Example 2: calling javascript file in html
<script type="text/javascript" src="yourfile.js"></script>
Example 3: print hello world in javascript
console.log("Hello, World!");
console.error("Error, World!");
console.warn("Warning, World!");
console.clear();
Example 4: how to enter javascript in html
<script type="text/javascript">
alert("This alert box was called with the onload event");
</script>
Example 5: call js script in html
<script src="file1.js" type="text/javascript"></script>
<script src="file2.js" type="text/javascript"></script>