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\$ The rules say you're allowed to return an object that evaluates to true or false, so the !! is not necessary \$\endgroup\$ Commented Mar 20, 2014 at 14:30
  • \$\begingroup\$ @James_pic Yeah, but otherwise it will return 1 or undefined (or object/undefined for the second case). \$\endgroup\$ Commented Mar 20, 2014 at 14:33
  • \$\begingroup\$ I interpreted the rules as saying that truth-y and false-y values would do in place of true and false, so I'd think that 1 or undefined were good enough. \$\endgroup\$ Commented Mar 20, 2014 at 14:35
  • \$\begingroup\$ @James_pic I just wanted to be on the safe side :) If so, then 18-2 = 16 bytes. \$\endgroup\$ Commented Mar 20, 2014 at 14:37