参考——这一行在 ecmascript 中是什么意思?
Reference- What does this line mean in ecmascript?
谁能帮我理解这个街区想表达的意思。我正在了解 Object.is
的 ecmaspec。我来到这段代码。我无法理解它试图描述的是
2. If Type(x) is Number or BigInt, then
Return ! Type(x)::sameValue(x, y).
完整代码是这样的:
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).
第一点和第三点我基本都看懂了,但是第二点没看懂。任何帮助或参考都会有所帮助。
如果x
是一个数字,使用一种数字类型的sameValue
重载方法来比较x
和y
。
谁能帮我理解这个街区想表达的意思。我正在了解 Object.is
的 ecmaspec。我来到这段代码。我无法理解它试图描述的是
2. If Type(x) is Number or BigInt, then
Return ! Type(x)::sameValue(x, y).
完整代码是这样的:
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).
第一点和第三点我基本都看懂了,但是第二点没看懂。任何帮助或参考都会有所帮助。
如果x
是一个数字,使用一种数字类型的sameValue
重载方法来比较x
和y
。