From d44f5032d0f53256b2d5aef505d6b593fd3cd158 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:14:18 +0800 Subject: fix yari h2m dry run errors (zh-CN) --- .../zh-cn/web/javascript/reference/statements/function/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/statements/function/index.html') 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) {

JavaScript 中的函数声明被提升到了函数定义。你可以在函数声明之前使用该函数:

-
hoisted(); // logs "foo"
+
hoisted(); // logs "foo"
 
 function hoisted() {
   console.log('foo');
@@ -98,10 +98,10 @@ function hoisted() {
 
-

注意 :函数表达式{{jsxref("Operators/function", "function expressions")}} 不会被提升:

+

备注:函数表达式{{jsxref("Operators/function", "function expressions")}} 不会被提升:

-
notHoisted(); // TypeError: notHoisted is not a function
+
notHoisted(); // TypeError: notHoisted is not a function
 
 var notHoisted = function() {
   console.log('bar');
@@ -114,7 +114,7 @@ var notHoisted = function() {
 
 

下面的代码声明了一个函数,该函数返回了销售的总金额, 参数是产品a,b,c分别的销售的数量.

-
function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction
+
function calc_sales(units_a, units_b, units_c) {functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunction
    return units_a*79 + units_b * 129 + units_c * 699;
 }
-- cgit v1.2.3-54-g00ecf