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*

4
  • \$\begingroup\$ Very nice. You can save some bytes by converting the array to a hexadecimal string, and using +('0x'+whatever) to convert it to a number: (_,c)=>b[(c/15|0)*14+ +('0x'+'0169abc7543268d'[c%15])] \$\endgroup\$ Commented Jan 20, 2017 at 12:45
  • \$\begingroup\$ Clever trick. I was already thinking of other ways to write the array, but I couldn't come up with any. I can still shorten that, by placing the hexadecimal number first and then the multiplication, making the space needless. \$\endgroup\$ Commented Jan 20, 2017 at 14:22
  • \$\begingroup\$ You could even do '0x'+'...'[c%15]-0+(c/15|0)*14 to save yourself a pair of parentheses :-) \$\endgroup\$ Commented Jan 20, 2017 at 14:32
  • \$\begingroup\$ You're right. Added. \$\endgroup\$ Commented Jan 20, 2017 at 14:40