And of course IPv6 URLs are valid JavaScript, just like any well-formed URL: http://[b001:db8:a853:d8d3:f319:ea2e:e370:734]/ (In JavaScript, this is a label named `http` followed by a single-line-comment.)
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Nice that the NumericLiteral can be scientific notation, so containing ‘e’ is ok! :7e4
-
That’s an exponentially better example.
- 1 more reply
New conversation -
-
-
I’m a little bit confused about what the “:” operator is in this case. My guess is the ternary, but without “?” preceding?
-
In both examples, each `:` follows a LabelIdentifier. The following are LabelledStatements: http: b001: db8: a853: https://tc39.es/ecma262/#sec-labelled-statements …
- 2 more replies
New conversation -
-
-
I like to annotate some of my JS with raw URL-comments to confuse people without syntax highlighting.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
So the bottom line is that, each segment of the ipv6 address are labels and the final segment is the value? What is the implication of this? Is it a security issue or something that most people wouldn't know?
-
I don’t think there are any implications, to be honest. It’s just a fun observation :)
- 1 more reply
New conversation -
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.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.