📜  10.4.1.2.使用 return 是可选函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:12.786000             🧑  作者: Mango

代码示例1
/*As we saw with our initial examples of function definitions, not every
function explicitly returns a value. At its simplest, a function can 
even have an empty body.*/

function doNothing() {}

/*As written, this function is completely valid, but useless. Although 
the function doesn't have a return statement, JavaScript still 
implicitly returns a value.*/