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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -