diff options
author | Irvin <irvinfly@gmail.com> | 2022-02-16 02:14:18 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | d44f5032d0f53256b2d5aef505d6b593fd3cd158 (patch) | |
tree | 4b585f4be9c9a2712664ad10e7acf62c83fff51f /files/zh-cn/web/javascript/equality_comparisons_and_sameness | |
parent | f45e9e070c93ebbd83d488bdd775987a4d75c201 (diff) | |
download | translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.gz translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.bz2 translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.zip |
fix yari h2m dry run errors (zh-CN)
Diffstat (limited to 'files/zh-cn/web/javascript/equality_comparisons_and_sameness')
-rw-r--r-- | files/zh-cn/web/javascript/equality_comparisons_and_sameness/index.html | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/files/zh-cn/web/javascript/equality_comparisons_and_sameness/index.html b/files/zh-cn/web/javascript/equality_comparisons_and_sameness/index.html index 502870405e..d36a7e3aad 100644 --- a/files/zh-cn/web/javascript/equality_comparisons_and_sameness/index.html +++ b/files/zh-cn/web/javascript/equality_comparisons_and_sameness/index.html @@ -382,13 +382,12 @@ function attemptMutation(v) <p>这里是一个会区别对待-0和+0的内置方法和操作符不完全列表:</p> -<p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#-_.28Unary_Negation.29" title="/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators"><code>- (一元负)</code></a></p> - <dl> + <dt><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#-_.28Unary_Negation.29" title="/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators"><code>- (一元负)</code></a></dt> <dd> <p>显而易见,对<code>0一元负操作得到</code><code>-0</code>。但表达式的抽象化可能在你没有意识到得情况下导致-0延续传播。例如当考虑下例时:</p> - <pre class="brush:js language-js">let stoppingForce = obj.mass * -obj.velocity</pre> + <pre class="brush:js">let stoppingForce = obj.mass * -obj.velocity</pre> <p>如果<code>obj.velocity</code>是<code>0</code> (或计算结果为<code>0</code>), <code>一个-0</code>就在上处产生并被赋值为<code>stoppingForce的值</code>.</p> </dd> |