Added new comments to return
Added new comments to return
This commit is contained in:
committed by
Kristofer Koishigawa
parent
584d552de4
commit
187ccf11c9
@ -33,6 +33,15 @@ function foo() {
|
|||||||
boo(); --> 1
|
boo(); --> 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
建議還是在同一行返回內容,而不使用新行返回,以免發生未定義的狀況。
|
||||||
|
|
||||||
|
若不打算返回任何內容,也可以寫:
|
||||||
|
|
||||||
|
```
|
||||||
|
return ;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## 例子
|
## 例子
|
||||||
|
|
||||||
以下函数返回其参数**x**的平方,其中**x**是数字。
|
以下函数返回其参数**x**的平方,其中**x**是数字。
|
||||||
|
Reference in New Issue
Block a user