Object.is steps are very thing

David Bruant bruant.d at gmail.com
Sat Mar 16 15:40:01 PDT 2013


Le 16/03/2013 19:18, Tom Schuster a écrit :
> Hey!
>
> Looking at the the steps for Object.is the first sentence just says:
>> "When the is function is called with arguments value1 and value2 the following steps are taken:"
> I don't remember other functions being defined like that. It should at
> least say something along the lines of
> "When called with less than 2 parameters return false."
I'd throw a TypeError. Calling Object.is with strictly more or less than 
2 parameters is most likely an error, akin to === with which something 
different than strictly 2 operands resultsis a SyntaxError.

David


More information about the es-discuss mailing list