简体   繁体   中英

Reference- What does this line mean in ecmascript?

Can someone help me to understand what this block is trying to say. I am going through understanding ecmaspec of Object.is . I come to this block of code. I am not able to understand what it is trying to depict is

2. If Type(x) is Number or BigInt, then
Return ! Type(x)::sameValue(x, y).

Full code is this:

1.If Type(x) is different from Type(y), return false.
2.If Type(x) is Number or BigInt, then
      Return ! Type(x)::sameValue(x, y).
3.Return ! SameValueNonNumeric(x, y).

I pretty much understand first and third statement but was not able to understand second point. Any help or reference would be helpful.

Here is doc reference: https://tc39.es/ecma262/#sec-samevalue

If x is a number, use a sameValue overload method of one of the number types to compare x and y .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM