在下面的handleSumit函数中,仅返回分号是什么意思。注意:我知道return用于终止javascript中的函数,而分号则终止语句。
1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 6th Largest
0 0 1 2 3 4 5 6 7 8 9 5
1 1 2 3 4 5 6 7 8 9 10 6
答案 0 :(得分:3)
return;
语句将undefined
返回给函数的调用者。
来自https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return
return [[expression]];
表达式
要返回其值的表达式。如果省略,则undefined为 而是返回了。
答案 1 :(得分:0)
如果您在使用某个函数且满足特定条件,则可能要退出该函数或终止该函数。这就是回报;