There are two simple ways to include Javascript in a HTML document.
Way 1 (script tags):
<script> console.log("Hello world") </script>
Way 2 (external file):
<script src="helloworld.js"> </script>
Assuming that helloworld.js contains the single line console.log("Hello world"), are these inclusions exactly equivalent? If not, what is the difference?
If the contents of the script were more complicated, would the answer to this question change?