3 ms·
Ask HN: What's the weirdest JavaScript source code you've seen?
I'm writing a Javascript parser, and I wanted to try parsing unusual JS code found in the wild.
Weirdness can be abuse of unicode, code obfuscation, unusual programming paradigms, etc
- stiaje 10y agoIf you're not limited to 'production' javascript, code golfing sites like http://dwitter.net http://dwitter.net will be a good source of strange javascript!
- al2o3cr 10y agoI hope nobody's using it in production, but the "JS without letters" thing would probably tickle a few edge cases in a parser: http://patriciopalladino.com/blog/2012/08/09/non-alphanumeric-javascript.html http://patriciopalladino.com/blog/2012/08/09/non-alphanumeri...
- stiaje 10y agoAlso, for _js without numbers_, this is the most compact way to write something that evaluates to the number 2: -~!""