Why is a URL in the middle of a function not causing an error?

javascript

Solution

You're defining a label called `http`. The `//` in the url comments the rest out.

see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label

Problem

By mistake, an URL was pasted into a JavaScript snippet. Reduced to a minimum, it looked roughly like this: ``` function(){ /* a bunch of code */ http://www.stackoverflow.com /* a bunch of code */ return "it still works"; } ``` It was overlooked for quite some time, because it did not produce an error. Why is that? Why does this function still run without erroring?

Original source