diff options
Diffstat (limited to 'files/zh-tw/web/javascript/reference')
-rw-r--r-- | files/zh-tw/web/javascript/reference/statements/block/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-tw/web/javascript/reference/statements/block/index.html b/files/zh-tw/web/javascript/reference/statements/block/index.html index 384e3c1223..0e1d2ce662 100644 --- a/files/zh-tw/web/javascript/reference/statements/block/index.html +++ b/files/zh-tw/web/javascript/reference/statements/block/index.html @@ -63,11 +63,11 @@ alert(x); // outputs 2 <p>當使用<code>let</code>或是<code>const</code>進行宣告時,其存取範圍是只有本身定義的區塊中。</p> -<pre class="brush: js line-numbers language-js"><code class="language-js">let x = 1; +<pre class="brush: js line-numbers language-js">let x = 1; { let x = 2; } -console.log(x); // logs 1</code></pre> +console.log(x); // logs 1</pre> <h4 id="function"><code>function</code></h4> |