Well, today I learned that <!-- this --> is syntactically acceptable JavaScript
-
-
Replying to @qntm
Specifically, `<!--` has the same effect as `//` i.e. it begins a single-line comment. (`-->` has no special meaning at all.)
4 replies 0 retweets 3 likes -
Replying to @qntm
I can't find any reference to this in the specification, but seemingly every JavaScript engine accepts it, for obvious historical reasons
3 replies 0 retweets 3 likes -
Replying to @qntm
It's so you could do <script type="text/javascript"><!-- console.log('hi'); //--></script> and avoid interpreting JS as HTML
1 reply 0 retweets 4 likes -
Replying to @qntm
I always did <script type="text/javascript">//<!-- like some idiot
1 reply 0 retweets 1 like
Outside that useful context, <!-- no match --> var x = -1; is quite a startling thing to encounter in supposedly valid JavaScript
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.