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/reference/statements/function | |
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/reference/statements/function')
-rw-r--r-- | files/zh-cn/web/javascript/reference/statements/function/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/statements/function/index.html b/files/zh-cn/web/javascript/reference/statements/function/index.html index cb225706eb..13efc35a6d 100644 --- a/files/zh-cn/web/javascript/reference/statements/function/index.html +++ b/files/zh-cn/web/javascript/reference/statements/function/index.html @@ -90,7 +90,7 @@ if (true) { <p>JavaScript 中的<strong>函数声明</strong>被提升到了<strong>函数定义</strong>。你可以在函数声明之前使用该函数:</p> -<pre class="brush: js language-js">hoisted(); // logs "foo" +<pre class="brush: js">hoisted(); // logs "foo" function hoisted() { console.log('foo'); @@ -98,10 +98,10 @@ function hoisted() { </pre> <div class="note"> -<p>注意 :<strong>函数表达式</strong>{{jsxref("Operators/function", "function expressions")}} 不会被提升:</p> +<p><strong>备注:</strong><strong>函数表达式</strong>{{jsxref("Operators/function", "function expressions")}} 不会被提升:</p> </div> -<pre class="brush: js language-js">notHoisted(); // TypeError: notHoisted is not a function +<pre class="brush: js">notHoisted(); // TypeError: notHoisted is not a function var notHoisted = function() { console.log('bar'); @@ -114,7 +114,7 @@ var notHoisted = function() { <p>下面的代码声明了一个函数,该函数返回了销售的总金额, 参数是产品a,b,c分别的销售的数量.</p> -<pre class="brush: js language-js">function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction +<pre class="brush: js">function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction return units_a*79 + units_b * 129 + units_c * 699; }</pre> |