Added new comments to return

Added new comments to return
This commit is contained in:
Victor Lin
2018-10-22 10:46:12 -07:00
committed by Kristofer Koishigawa
parent 584d552de4
commit 187ccf11c9

View File

@ -33,6 +33,15 @@ function foo() {
boo(); --> 1
```
建議還是在同一行返回內容,而不使用新行返回,以免發生未定義的狀況。
若不打算返回任何內容,也可以寫:
```
return ;
```
## 例子
以下函数返回其参数**x**的平方,其中**x**是数字。