SameValue corresponds to Object.is in ES6. /Andreas
On 9 September 2014 08:17, Ben Noordhuis <[email protected]> wrote: > On Tue, Sep 9, 2014 at 3:02 AM, Ian Bull <[email protected]> wrote: >> Hi everyone, >> >> I was looking at the object equality methods that exist in V8 (on the Object >> class). There are StrictEquals (which I assume maps to ===), and SameValue >> (which I assume maps to ==). However, there is a third 'Equals' method. What >> are the semantics of this method. In particular, when would this return a >> different value than StrictEquals? >> >> Cheers, >> Ian > > Equals() and StrictEquals() correspond to == and === respectively. > > SameValue() doesn't have a corresponding JS operator but it's a > stricter StrictEquals(), it returns true when comparing two NaN values > and false when comparing +0 and -0. > > -- > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
