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

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

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -