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
  • \$\begingroup\$ @user81655 Not bad, but I've further improved it. \$\endgroup\$ Commented Feb 10, 2016 at 21:24
  • 1
    \$\begingroup\$ if you use the rest parameter for input, it will save you 3 bytes: (...a)=>/^(2|t0|t[wo]?o),b(ee?|3)?$/.test(a) \$\endgroup\$ Commented Feb 10, 2016 at 22:33
  • \$\begingroup\$ @PatrickRoberts Huh, I had thought about that, but I must have miscalculated, because I didn't think I was saving anything. \$\endgroup\$ Commented Feb 10, 2016 at 23:53
  • \$\begingroup\$ The i flag is missing. \$\endgroup\$ Commented Feb 11, 2016 at 18:58
  • \$\begingroup\$ @Florent Thanks for spotting that. (Maybe the examples should not be all lower case...) \$\endgroup\$ Commented Feb 11, 2016 at 19:31