Chrome/Firefox - Javascript file is loaded but is not run. Console is empty

I just had this issue. All I needed was to run a simple javascript to test something. But it just wouldn't run. In the end I cut it down to just a simple console log, and still nothing happened!

console.log('hello world'); //Nothing in the console!

Alright, I would not be creating a blog post if I did not have an answer to this. The answer is kindda embarassing but I hope it can save some time for someone else out there. The problem was that I had written the script in this way:

<script src="SomeScript.js" />

I had used a self closing tag! What really annoys me is that in chrome I do see the script being loaded. It's just that nothing happens. All I had to do was to change the above to the following:

<script src="SomeScript.js"></script>

You can read more on why this behavior occours on stack overflow where there is - as always - a question on this. After years of being a web developer you still find yourself making these mistakes. However with all the javascript bundling these days it is rare you have to include a script.

I hope this helps someone out there!