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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With