docs: fix typos

This commit is contained in:
Chen Fengyuan
2019-01-23 15:06:56 +08:00
parent 46981f6b9a
commit 7d266f0ce7
14 changed files with 32 additions and 36 deletions
+6 -6
View File
@@ -24,7 +24,7 @@ ES6 规格使用了一些专门的术语,了解这些术语,可以帮助你
### 抽象操作
所谓抽象操作abstract operations)就是引擎的一些内部方法,外部不能调用。规格定义了一系列的抽象操作,规定了它们的行为,留给各种引擎自己去实现。
所谓抽象操作abstract operations)就是引擎的一些内部方法,外部不能调用。规格定义了一系列的抽象操作,规定了它们的行为,留给各种引擎自己去实现。
举例来说,`Boolean(value)`的算法,第一步是这样的。
@@ -32,7 +32,7 @@ ES6 规格使用了一些专门的术语,了解这些术语,可以帮助你
这里的`ToBoolean`就是一个抽象操作,是引擎内部求出布尔值的算法。
许多函数的算法都会多次用到同样的步骤,所以 ES6 规格将它们抽出来,定义成抽象操作,方便描述。
许多函数的算法都会多次用到同样的步骤,所以 ES6 规格将它们抽出来,定义成抽象操作,方便描述。
### Record 和 field
@@ -127,15 +127,15 @@ ES6 规格将这个标准流程,使用简写的方式表达。
> 1. Return the result of performing Strict Equality Comparison `x === y`.
> 1. If `x` is `null` and `y` is `undefined`, return `true`.
> 1. If `x` is `undefined` and `y` is `null`, return `true`.
> 1. If `Type(x)` is Number and `Type(y)` is String,
> 1. If `Type(x)` is Number and `Type(y)` is String,
> return the result of the comparison `x == ToNumber(y)`.
> 1. If `Type(x)` is String and `Type(y)` is Number,
> 1. If `Type(x)` is String and `Type(y)` is Number,
> return the result of the comparison `ToNumber(x) == y`.
> 1. If `Type(x)` is Boolean, return the result of the comparison `ToNumber(x) == y`.
> 1. If `Type(y)` is Boolean, return the result of the comparison `x == ToNumber(y)`.
> 1. If `Type(x)` is either String, Number, or Symbol and `Type(y)` is Object, then
> 1. If `Type(x)` is either String, Number, or Symbol and `Type(y)` is Object, then
> return the result of the comparison `x == ToPrimitive(y)`.
> 1. If `Type(x)` is Object and `Type(y)` is either String, Number, or Symbol, then
> 1. If `Type(x)` is Object and `Type(y)` is either String, Number, or Symbol, then
> return the result of the comparison `ToPrimitive(x) == y`.
> 1. Return `false`.