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.

8
  • \$\begingroup\$ Can't you do !!(n%12) instead of [1,0][+!(n%12)]? \$\endgroup\$ Commented May 3, 2021 at 15:21
  • \$\begingroup\$ @CommandMaster that returns a boolean, not a number. And that's a problem, because we can't index arrays with booleans. \$\endgroup\$
    – user100690
    Commented May 3, 2021 at 15:22
  • 1
    \$\begingroup\$ Than you can do +!!(n%12). Why do you need to index an array? \$\endgroup\$ Commented May 3, 2021 at 15:23
  • \$\begingroup\$ @CommandMaster thanks for that one! I will edit that into my post.$ \$\endgroup\$
    – user100690
    Commented May 3, 2021 at 15:25
  • 1
    \$\begingroup\$ 23 bytes \$\endgroup\$
    – Arnauld
    Commented May 3, 2021 at 16:33