From 04c0c69e2507481a7a54eb8efe343f8da875e55a Mon Sep 17 00:00:00 2001 From: liujiandong Date: Sat, 3 Feb 2018 00:01:53 +0800 Subject: [PATCH] translated: issue #14 --- translated/issues-14.html | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/translated/issues-14.html b/translated/issues-14.html index 0266f22c4b..ee6b37a01c 100644 --- a/translated/issues-14.html +++ b/translated/issues-14.html @@ -1,6 +1,6 @@

IsInteger ( _argument_ )

-

The abstract operation IsInteger determines if _argument_ is a finite integer numeric value.

+

抽象操作 IsInteger 用于判断 _argument_ 是否为一个有限整数数值。

1. If Type(_argument_) is not Number, return *false*. 1. If _argument_ is *NaN*, *+∞*, or *-∞*, return *false*. @@ -12,7 +12,7 @@

IsInteger ( _argument_ )

IsPropertyKey ( _argument_ )

-

The abstract operation IsPropertyKey determines if _argument_, which must be an ECMAScript language value, is a value that may be used as a property key.

+

抽象操作 IsPropertyKey 用于判断 _argument_ 是否可用作为对象的属性的 key,_argument_ 必须是一个 ECMAScript 语言值。

1. If Type(_argument_) is String, return *true*. 1. If Type(_argument_) is Symbol, return *true*. @@ -23,7 +23,7 @@

IsPropertyKey ( _argument_ )

IsRegExp ( _argument_ )

-

The abstract operation IsRegExp with argument _argument_ performs the following steps:

+

参数为 _argument_ 的抽象操作 IsRegExp 执行步骤如下:

1. If Type(_argument_) is not Object, return *false*. 1. Let _matcher_ be ? Get(_argument_, @@match). @@ -35,7 +35,7 @@

IsRegExp ( _argument_ )

IsStringPrefix ( _p_, _q_ )

-

The abstract operation IsStringPrefix determines if String _p_ is a prefix of String _q_.

+

抽象操作 IsStringPrefix 确定字符串 _p_ 是不是字符串 _q_ 的前缀。

1. Assert: Type(_p_) is String. 1. Assert: Type(_q_) is String. @@ -47,7 +47,7 @@

IsStringPrefix ( _p_, _q_ )

SameValue ( _x_, _y_ )

-

The internal comparison abstract operation SameValue(_x_, _y_), where _x_ and _y_ are ECMAScript language values, produces *true* or *false*. Such a comparison is performed as follows:

+

内部比较抽象操作 SameValue(_x_, _y_) 返回 *true* 或 *false*,其中 _x_ 和 _y_ 都是 ECMAScript 语言值。它将执行比较如下:

1. If Type(_x_) is different from Type(_y_), return *false*. 1. If Type(_x_) is Number, then @@ -59,14 +59,14 @@

SameValue ( _x_, _y_ )

1. Return SameValueNonNumber(_x_, _y_).
-

This algorithm differs from the Strict Equality Comparison Algorithm in its treatment of signed zeroes and NaNs.

+

这个算法在比较有符号的 0 以及比较 NaN 时和严格相等比较算法不同。

SameValueZero ( _x_, _y_ )

-

The internal comparison abstract operation SameValueZero(_x_, _y_), where _x_ and _y_ are ECMAScript language values, produces *true* or *false*. Such a comparison is performed as follows:

+

内部比较抽象操作 SameValueZero(_x_, _y_) 返回 *true* 或 *false*,其中 _x_ 和 _y_ 都是ECMAScript语言值。 它将执行比较如下:

1. If Type(_x_) is different from Type(_y_), return *false*. 1. If Type(_x_) is Number, then @@ -74,17 +74,17 @@

SameValueZero ( _x_, _y_ )

1. If _x_ is *+0* and _y_ is *-0*, return *true*. 1. If _x_ is *-0* and _y_ is *+0*, return *true*. 1. If _x_ is the same Number value as _y_, return *true*. - 1. Return *false*. + 1. Return `false`. 1. Return SameValueNonNumber(_x_, _y_).
-

SameValueZero differs from SameValue only in its treatment of *+0* and *-0*.

+

SameValueZero 与 SameValue 仅在处理 `+0` 和 `-0` 时不同

SameValueNonNumber ( _x_, _y_ )

-

The internal comparison abstract operation SameValueNonNumber(_x_, _y_), where neither _x_ nor _y_ are Number values, produces *true* or *false*. Such a comparison is performed as follows:

+

内部比较抽象操作 SameValueNonNumber(_x_, _y_) 返回 *true* 或 *false*,其中 _x_ 和 _y_ 都是 Number 值。它将执行比较如下:

1. Assert: Type(_x_) is not Number. 1. Assert: Type(_x_) is the same as Type(_y_). @@ -102,10 +102,10 @@

SameValueNonNumber ( _x_, _y_ )

-

Abstract Relational Comparison

-

The comparison _x_ < _y_, where _x_ and _y_ are values, produces *true*, *false*, or *undefined* (which indicates that at least one operand is *NaN*). In addition to _x_ and _y_ the algorithm takes a Boolean flag named _LeftFirst_ as a parameter. The flag is used to control the order in which operations with potentially visible side-effects are performed upon _x_ and _y_. It is necessary because ECMAScript specifies left to right evaluation of expressions. The default value of _LeftFirst_ is *true* and indicates that the _x_ parameter corresponds to an expression that occurs to the left of the _y_ parameter's corresponding expression. If _LeftFirst_ is *false*, the reverse is the case and operations must be performed upon _y_ before _x_. Such a comparison is performed as follows:

+

抽象关系比较

+

比较_x_ < _y_,_x_ 和 _y_ 都是 ECMAScript 语言值,将可能产生*true*, *false*, 或 *undefined*(表示其中至少有一个操作数为 *NaN*)。除了 _x_ 和 _y_ 之外,算法会使用一个名为 _LeftFirst_ 的 Boolean 类型标志,作为一个参数。这个标志用于控制对 _x_ 和 _y_ 执行潜在可见副作用操作的顺序。这是有必要的,因为 ECMAScript 规定计算是从左向右的。_LeftFirst_ 的默认值为 *true*,表示 _x_ 参数相应表达式在 _y_ 参数相应的表达式的左测。如果 _LeftFirst_ 为 *false*,则必须在 _x_ 之前执行 _y_。具体比较执行如下:

- 1. If the _LeftFirst_ flag is *true*, then + 1. If the _LeftFirst_ flag is `true`, then 1. Let _px_ be ? ToPrimitive(_x_, hint Number). 1. Let _py_ be ? ToPrimitive(_y_, hint Number). 1. Else the order of evaluation needs to be reversed to preserve left to right evaluation, @@ -132,19 +132,19 @@

Abstract Relational Comparison

1. If _ny_ is *-∞*, return *false*. 1. If _nx_ is *-∞*, return *true*. 1. If the mathematical value of _nx_ is less than the mathematical value of _ny_—note that these mathematical values are both finite and not both zero—return *true*. Otherwise, return *false*. -
+
-

Step 3 differs from step 7 in the algorithm for the addition operator `+` () by using the logical-and operation instead of the logical-or operation.

+

算法中的第三步和第七步不同是加法运算 `+` ()使用逻辑与操作而不是使用逻辑或操作。

-

The comparison of Strings uses a simple lexicographic ordering on sequences of code unit values. There is no attempt to use the more complex, semantically oriented definitions of character or string equality and collating order defined in the Unicode specification. Therefore String values that are canonically equal according to the Unicode standard could test as unequal. In effect this algorithm assumes that both Strings are already in normalized form. Also, note that for strings containing supplementary characters, lexicographic ordering on sequences of UTF-16 code unit values differs from that on sequences of code point values.

+

字符串类型的比较使用码元值序列的简单词典排序。这里没有尝试使用 Unicode 规范定义的更复杂的,基于语义的字符或字符串相等,以及排序顺序进行比较。因此,根据 Unicode 标准在规范上相等的字符串值可能测试为不相等。实际上,该算法假设了两个值是已经标准化的值。另外还需注意,对于包含补充字符的字符串,UTF-16 码元值序列与普通码元值序列的词典排序是不同的。

-

Abstract Equality Comparison

-

The comparison _x_ == _y_, where _x_ and _y_ are values, produces *true* or *false*. Such a comparison is performed as follows:

+

抽象相等比较

+

比较 _x_ == _y_,产生 *true*,*false*,其中 _x_ 与 _y_ 都是 ECMAScript 语言值。具体比较算法如下:

1. If Type(_x_) is the same as Type(_y_), then 1. Return the result of performing Strict Equality Comparison _x_ === _y_. @@ -162,8 +162,8 @@

Abstract Equality Comparison

-

Strict Equality Comparison

-

The comparison _x_ === _y_, where _x_ and _y_ are values, produces *true* or *false*. Such a comparison is performed as follows:

+

严格相等比较

+

比较 _x_ === _y_,产生 *true*,*false*,其中 _x_ 和 _y_ 都是ECMAScript语言值。具体比较算法如下:

1. If Type(_x_) is different from Type(_y_), return *false*. 1. If Type(_x_) is Number, then @@ -176,7 +176,7 @@

Strict Equality Comparison

1. Return SameValueNonNumber(_x_, _y_).
-

This algorithm differs from the SameValue Algorithm in its treatment of signed zeroes and NaNs.

+

该算法与SameValue算法不同之处在于对有符号的 0 和 NaN 的处理。

\ No newline at end of file