javascript - Why is a URL in the middle of a function not causing an error? -
by mistake, url pasted javascript snippet. reduced minimum, looked this:
function(){ /* bunch of code */ http://www.stackoverflow.com /* bunch of code */ return "it still works"; }
it overlooked quite time, because did not produce error. why that? why function still run without erroring?
you're defining label called http
. //
in url comments rest out.
see: https://developer.mozilla.org/en-us/docs/web/javascript/reference/statements/label
Comments
Post a Comment