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

I noticed that too, and thought the very same thing.

At the same time you had stand-alone code-samples which were of dubious quality at best:

    if (document.someBoolean) {
        setEnabled(true);
    } else {
        setEnabled(false);
    }
I mean... Really? :)

So yeah. Coupled with lots of Chrome-only APIs, I wouldn't consider this a very high quality article.




lol... yes, that's SMH level stuff...

how about:

  setEnabled(
    Boolean(
      document.someBoolean
    )
  )


Just curious, but why `Boolean()` over `!!`?


I would imagine because it's much easier to read. What does '!!" Do again I just thought :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: