Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 3
    \$\begingroup\$ I wonder what the probability of this generating valid JavaScript is. (Nerd snipe warning) \$\endgroup\$ Commented Nov 1, 2016 at 6:29
  • 2
    \$\begingroup\$ @DanTheMan Certainly very, very low. Just the probability of all parentheses and brackets being balanced is incredibly low. Although one time I got a.splerength.r(), which could be valid ;) \$\endgroup\$ Commented Nov 1, 2016 at 13:23
  • 1
    \$\begingroup\$ Might want to note this is FF only due to the use of uneval \$\endgroup\$ Commented Nov 1, 2016 at 13:42
  • 1
    \$\begingroup\$ @ShaunH Thanks, I forgot that only FF supports uneval. \$\endgroup\$ Commented Nov 1, 2016 at 13:46
  • 5
    \$\begingroup\$ The second self-reading function isn't valid (meta.codegolf.stackexchange.com/a/4878/48878 "a quine must not access its own source, directly or indirectly."), and @DanTheMan, according to jsfiddle.net/kabkfLak/1, the chance should be around 6.3%. \$\endgroup\$ Commented Nov 2, 2016 at 15:31