Hacker News new | past | comments | ask | show | jobs | submit login

I wonder how they picked three as too many. Why not two?

> Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out.




Maybe because of the use of the "double bang" pattern to convert a value to boolean:

    !!41 === true
    !!0  === false


`!!thing` is a fairly common JS idiom for "I have a truthy/falsy thing and I want true or false."


Two really does seem too many. I worry about these times when any passing coder can ni-gate at will.


This is the obvious answer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: