From c4b1621825edbde03e0d87204df050078118c392 Mon Sep 17 00:00:00 2001 From: Victor Lin Date: Mon, 8 Apr 2019 16:13:03 -0700 Subject: [PATCH] Added a note. (#26167) * Added a note. Added a note. * Update to Simplified Chinese --- guide/chinese/javascript/arrow-functions/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guide/chinese/javascript/arrow-functions/index.md b/guide/chinese/javascript/arrow-functions/index.md index 9467845e9b..8df8c76494 100644 --- a/guide/chinese/javascript/arrow-functions/index.md +++ b/guide/chinese/javascript/arrow-functions/index.md @@ -25,7 +25,8 @@ Arrow函数是用于编写JavaScript函数表达式的新ES6语法。较短的 var multiply = (x, y) => x * y; ``` -您不再需要`function`和`return`关键字,甚至是大括号。 +您不再需要`function`和`return`关键字,甚至是花括号。 +注意:只有在整个功能在同一行的時候才能省略花括号和`return`关键字。不然会报错。 ### 简化了`this` @@ -63,4 +64,4 @@ Arrow函数是用于编写JavaScript函数表达式的新ES6语法。较短的 #### 进一步阅读 -[MDN链接](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) \ No newline at end of file +[MDN链接](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)