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*

5
  • 1
    \$\begingroup\$ I'm using google chrome, and these are all giving undefined. \$\endgroup\$ Commented May 14, 2015 at 19:19
  • \$\begingroup\$ It must be very firefox specific then. Sorry for the inconvenience. \$\endgroup\$ Commented May 15, 2015 at 16:44
  • \$\begingroup\$ Why are these all special characters? Why not just use printable ASCII? (easier to type, more reliable, and only 1 byte for golfing) \$\endgroup\$ Commented Feb 10, 2016 at 20:02
  • 1
    \$\begingroup\$ This doesn't really work for Math because it doesn't have a .prototype attribute. Removing Math, though, I managed to golf this down to a 114-byte snippet that assigns them all to single-byte letters. You can find it Object.getOwnPropertyNames(P=x.__proto__).map((p,i)=>P[String.fromCharCode(i+65+6*(i>25))]=P[p]))" rel="nofollow noreferrer">here. \$\endgroup\$ Commented Dec 3, 2016 at 20:50
  • 3
    \$\begingroup\$ You can also golf my solution to 106 bytes at the expense of moving all these properties to the range À-ÿ, which is still 1 byte each in the ISO-8859-1 encoding (which JS supports). In Firefox 50, this unfortunately puts the .localeCompare method on ×, but that shouldn't usually be an issue. Object.getOwnPropertyNames(P=x.__proto__).map((p,i)=>P[String.fromCharCode(i+192)]=P[p]))" rel="nofollow noreferrer">source \$\endgroup\$ Commented Dec 3, 2016 at 21:59