Number.isNaN

Andreas Rossberg rossberg at google.com
Thu Dec 13 23:43:26 PST 2012


On 14 December 2012 06:46, John-David Dalton
<john.david.dalton at gmail.com> wrote:
>Axel Rauschmayer:
>> Honest question: I have yet to see boxed values in practice. Are there any
>> real use cases?
>
> See Modernizr:
> https://github.com/Modernizr/Modernizr/blob/master/feature-detects/video.js#L23

I think not. And wrapping bools, like the above piece of code does, is
a particularly bad idea, because JS says

  (Object(false) ? 1 : 2)  ===  1

/Andreas


More information about the es-discuss mailing list