mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-20 02:05:48 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<article id="wikiArticle">
|
||||
<div></div>
|
||||
<h2 id="错误提示">错误提示</h2>
|
||||
<pre class="syntaxbox">SyntaxError: applying the 'delete' operator to an unqualified name is deprecated (Firefox)
|
||||
<pre><code class="language-javascript">SyntaxError: applying the 'delete' operator to an unqualified name is deprecated (Firefox)
|
||||
SyntaxError: Delete of an unqualified identifier in strict mode. (Chrome)
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="错误类型">错误类型</h2>
|
||||
<p><a href="Reference/Global_Objects/SyntaxError" title="SyntaxError 对象代表尝试解析语法上不合法的代码的错误。"><code>SyntaxError</code></a> 仅出现在<a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a>下。</p>
|
||||
<h2 id="哪里出错了?">哪里出错了?</h2>
|
||||
@@ -13,7 +13,7 @@ SyntaxError: Delete of an unqualified identifier in strict mode. (Chrome)
|
||||
<p>这个错误提示只出现于<a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">严格模式</a>。在非严格模式下,该操作返回 false。</p>
|
||||
<h2 id="示例">示例</h2>
|
||||
<p>在 JavaScript 中,普通变量是不能删除的,在严格模式下会报错:</p>
|
||||
<pre class="brush: js example-bad">'use strict';
|
||||
<pre><code class="language-js example-bad">'use strict';
|
||||
|
||||
var x;
|
||||
|
||||
@@ -23,9 +23,9 @@ delete x;
|
||||
|
||||
// SyntaxError: applying the 'delete' operator to an unqualified name
|
||||
// is deprecated
|
||||
</pre>
|
||||
</code></pre>
|
||||
<p>要释放变量引用的内容,可以将变量值设置为 <a href="Reference/Global_Objects/null" title="值 null 特指对象的值未设置。它是 JavaScript 基本类型 之一。"><code>null</code></a>:</p>
|
||||
<pre class="brush: js example-good">'use strict';
|
||||
<pre><code class="language-js example-good">'use strict';
|
||||
|
||||
var x;
|
||||
|
||||
@@ -34,7 +34,7 @@ var x;
|
||||
x = null;
|
||||
|
||||
// x can be garbage collected
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="相关内容">相关内容</h2>
|
||||
<ul>
|
||||
<li><code><a href="/en-US/docs/Web/JavaScript/Reference/Operators/delete">delete</a></code></li>
|
||||
|
||||
Reference in New Issue
Block a user