diff options
author | Hoarfroster <hoarfroster@outlook.com> | 2021-06-06 20:33:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 09:33:31 +0800 |
commit | f9c2bf54fd9ac88298d1b576dfa8d2eb08bae9de (patch) | |
tree | 3b9f1aa5a1c47a8780036535d383ee6cf334b4ad /files/zh-cn/web | |
parent | 649cafc4df8fb1ab8e39fb8ac1fa8016d215baca (diff) | |
download | translated-content-f9c2bf54fd9ac88298d1b576dfa8d2eb08bae9de.tar.gz translated-content-f9c2bf54fd9ac88298d1b576dfa8d2eb08bae9de.tar.bz2 translated-content-f9c2bf54fd9ac88298d1b576dfa8d2eb08bae9de.zip |
Update Web/JavaScript/Reference/Operators, zh-CN (#1127)
* Update index.html content
统一 "." => "。"
* Update 逻辑赋值运算符
Update 逻辑赋值运算符
Diffstat (limited to 'files/zh-cn/web')
-rw-r--r-- | files/zh-cn/web/javascript/reference/operators/index.html | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/index.html b/files/zh-cn/web/javascript/reference/operators/index.html index 238cbb8cb9..5387a37f1a 100644 --- a/files/zh-cn/web/javascript/reference/operators/index.html +++ b/files/zh-cn/web/javascript/reference/operators/index.html @@ -51,31 +51,31 @@ translation_of: Web/JavaScript/Reference/Operators <dl> <dt>{{jsxref("Operators/Property_accessors", "属性访问符", "", 1)}}</dt> - <dd>成员运算符提供了对对象的属性或方法的访问<br> + <dd>成员运算符提供了对对象的属性或方法的访问。<br> (<code>object.property</code> 和 <code>object["property"]</code>).</dd> <dt>{{jsxref("Operators/new", "new")}}</dt> <dd><code>new</code> 运算符创建了构造函数实例。</dd> <dt>{{JSxRef("Operators/new%2Etarget", "new.target")}}</dt> <dd>在构造器中,<code>new.target</code> 指向{{jsxref("Operators/new", "new")}}调用的构造器。</dd> <dt>{{jsxref("Operators/super", "super")}}</dt> - <dd><code>super</code> 关键字调用父类的构造器.</dd> + <dd><code>super</code> 关键字调用父类的构造器。</dd> <dt>{{jsxref("Operators/Spread_operator", "...obj")}}</dt> <dd>展开运算符可以将一个可迭代的对象在函数调用的位置展开成为多个参数,或者在数组字面量中展开成多个数组元素。</dd> </dl> <h3 id="自增和自减">自增和自减</h3> -<p>前置/后置自增运算符和前置/后置自减运算符.</p> +<p>前置/后置自增运算符和前置/后置自减运算符。</p> <dl> <dt>{{jsxref("Operators/Arithmetic_Operators", "A++", "#Increment")}}</dt> - <dd>后置自增运算符.</dd> + <dd>后置自增运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "A--", "#Decrement")}}</dt> - <dd>后置自减运算符.</dd> + <dd>后置自减运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "++A", "#Increment")}}</dt> - <dd>前置自增运算符.</dd> + <dd>前置自增运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "--A", "#Decrement")}}</dt> - <dd>前置自减运算符.</dd> + <dd>前置自减运算符。</dd> </dl> <h3 id="一元运算符">一元运算符</h3> @@ -84,19 +84,19 @@ translation_of: Web/JavaScript/Reference/Operators <dl> <dt>{{jsxref("Operators/delete", "delete")}}</dt> - <dd><code>delete</code> 运算符用来删除对象的属性.</dd> + <dd><code>delete</code> 运算符用来删除对象的属性。</dd> <dt>{{jsxref("Operators/void", "void")}}</dt> - <dd><code>void</code> 运算符表示表达式放弃返回值.</dd> + <dd><code>void</code> 运算符表示表达式放弃返回值。</dd> <dt>{{jsxref("Operators/typeof", "typeof")}}</dt> - <dd><code>typeof</code> 运算符用来判断给定对象的类型.</dd> + <dd><code>typeof</code> 运算符用来判断给定对象的类型。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "+", "#Unary_plus")}}</dt> - <dd>一元加运算符将操作转换为Number类型.</dd> + <dd>一元加运算符将操作转换为Number类型。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "-", "#Unary_negation")}}</dt> - <dd>一元减运算符将操作转换为Number类型并取反.</dd> + <dd>一元减运算符将操作转换为Number类型并取反。</dd> <dt>{{jsxref("Operators/Bitwise_Operators", "~", "#Bitwise_NOT")}}</dt> - <dd>按位非运算符.</dd> + <dd>按位非运算符。</dd> <dt>{{jsxref("Operators/Logical_Operators", "!", "#Logical_NOT")}}</dt> - <dd>逻辑非运算符.</dd> + <dd>逻辑非运算符。</dd> </dl> <h3 id="算术运算符">算术运算符</h3> @@ -105,15 +105,15 @@ translation_of: Web/JavaScript/Reference/Operators <dl> <dt>{{jsxref("Operators/Arithmetic_Operators", "+", "#Addition")}}</dt> - <dd>加法运算符.</dd> + <dd>加法运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "-", "#Subtraction")}}</dt> - <dd>减法运算符.</dd> + <dd>减法运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "/", "#Division")}}</dt> - <dd>除法运算符.</dd> + <dd>除法运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "*", "#Multiplication")}}</dt> - <dd>乘法运算符.</dd> + <dd>乘法运算符。</dd> <dt>{{jsxref("Operators/Arithmetic_Operators", "%", "#Remainder")}}</dt> - <dd>取模运算符.</dd> + <dd>取模运算符。</dd> </dl> <h3 id="关系运算符">关系运算符</h3> @@ -122,15 +122,15 @@ translation_of: Web/JavaScript/Reference/Operators <dl> <dt>{{jsxref("Operators/in", "in")}}</dt> - <dd><code>in运算符用来判断对象是否拥有给定属性</code>.</dd> + <dd><code>in运算符用来判断对象是否拥有给定属性。</code>.</dd> <dt>{{jsxref("Operators/instanceof", "instanceof")}}</dt> - <dd><code>instanceof</code> 运算符判断一个对象是否是另一个对象的实例.</dd> + <dd><code>instanceof</code> 运算符判断一个对象是否是另一个对象的实例。</dd> <dt>{{jsxref("Operators/Comparison_Operators", "<", "#Less_than_operator")}}</dt> - <dd>小于运算符</dd> + <dd>小于运算符。</dd> <dt>{{jsxref("Operators/Comparison_Operators", ">", "#Greater_than_operator")}}</dt> - <dd>大于运算符.</dd> + <dd>大于运算符。</dd> <dt>{{jsxref("Operators/Comparison_Operators", "<=", "#Less_than_or_equal_operator")}}</dt> - <dd>小于等于运算符.</dd> + <dd>小于等于运算符。</dd> <dt>{{jsxref("Operators/Comparison_Operators", ">=", "#Greater_than_or_equal_operator")}}</dt> <dd>大于等于运算符。 </dd> </dl> @@ -139,7 +139,7 @@ translation_of: Web/JavaScript/Reference/Operators <h3 id="相等运算符">相等运算符</h3> -<p>如果相等,操作符返回的是Boolean(布尔)类型的true,否则是false。</p> +<p>如果相等,操作符返回的是布尔类型的true,否则是false。</p> <dl> <dt>{{jsxref("Operators/Comparison_Operators", "==", "#Equality")}}</dt> @@ -180,15 +180,15 @@ translation_of: Web/JavaScript/Reference/Operators <h3 id="二元逻辑运算符">二元逻辑运算符</h3> -<p>逻辑运算符典型的用法是用于boolean(逻辑)值运算, 它们返回boolean值。</p> +<p>逻辑运算符典型的用法是用于布尔(逻辑)值运算, 它们返回布尔值。</p> <dl> <dt>{{jsxref("Operators/Logical_Operators", "&&", "#Logical_AND")}}</dt> - <dd>逻辑与.</dd> + <dd>逻辑与。</dd> <dt>{{jsxref("Operators/Logical_Operators", "||", "#Logical_OR")}}</dt> - <dd>逻辑或.</dd> + <dd>逻辑或。</dd> <dt>{{JSxRef("Operators/Nullish_coalescing_operator", "??")}}</dt> - <dd>空值合并运算符 , 如果 ?? 前面是 null 或 undefined ,取后面的默认值</dd> + <dd>空值合并运算符,如果 ?? 前面是 null 或 undefined,取后面的默认值</dd> </dl> <h3 id="条件三元运算符">条件(三元)运算符</h3> @@ -229,6 +229,12 @@ translation_of: Web/JavaScript/Reference/Operators <dd>赋值按位异或。</dd> <dt>{{jsxref("Operators/Assignment_Operators", "|=", "#Bitwise_OR_assignment")}}</dt> <dd>赋值或。</dd> + <dt>{{JSxRef("Operators/Logical_AND_assignment", "&&=")}}</dt> + <dd>逻辑和赋值运算符。</dd> + <dt>{{JSxRef("Operators/Logical_OR_assignment", "||=")}}</dt> + <dd>逻辑或赋值运算符。</dd> + <dt>{{JSxRef("Operators/Logical_nullish_assignment", "??=")}}</dt> + <dd>逻辑空赋值运算符。</dd> <dt>{{jsxref("Operators/Destructuring_assignment", "[a, b] = [1, 2]")}}<br> {{jsxref("Operators/Destructuring_assignment", "{a, b} = {a:1, b:2}")}}</dt> <dd> |