Equality Reform(ul)ation

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Jan 15 09:50:31 PST 2014


I would expect that to be `true` same as `0 == {valueOf:Number}` would be


On Wed, Jan 15, 2014 at 5:10 AM, Kevin Smith <zenparsing at gmail.com> wrote:

>
>>> js> 0L == "0"
>>> typein:2:0 TypeError: no operator function found for ==
>>>
>>
>>
> And what does this do?
>
>     0L == { valueOf() { return 0 } }
>
> Is the Object-type operand converted to a primitive before the overload is
> matched?
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140115/27af8cf8/attachment.html>


More information about the es-discuss mailing list