aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/operators/unary_plus
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/operators/unary_plus')
-rw-r--r--files/zh-cn/web/javascript/reference/operators/unary_plus/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/zh-cn/web/javascript/reference/operators/unary_plus/index.html b/files/zh-cn/web/javascript/reference/operators/unary_plus/index.html
index 9f3b818df9..da09fa1f02 100644
--- a/files/zh-cn/web/javascript/reference/operators/unary_plus/index.html
+++ b/files/zh-cn/web/javascript/reference/operators/unary_plus/index.html
@@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Operators/Unary_plus
<h2 id="语法">语法</h2>
-<pre class="syntaxbox notranslate"><strong>Operator:</strong> +<var>x</var>
+<pre class="syntaxbox"><strong>Operator:</strong> +<var>x</var>
</pre>
<h2 id="Description">Description</h2>
@@ -24,7 +24,7 @@ translation_of: Web/JavaScript/Reference/Operators/Unary_plus
<h3 id="Usage_with_numbers">Usage with numbers</h3>
-<pre class="brush: js notranslate">const x = 1;
+<pre class="brush: js">const x = 1;
const y = -1;
console.log(+x);
@@ -34,7 +34,7 @@ console.log(+y);
<h3 id="Usage_with_non-numbers">Usage with non-numbers</h3>
-<pre class="brush: js notranslate">+true // 1
+<pre class="brush: js">+true // 1
+false // 0
+null // 0
+function(val){ return val } // NaN