非本地返回可以在 JavaScript 中实现吗,这样你就可以编写如下内容:
function some_function() {
function some_other_function(value) {
non-local-return true;
}
some_other_function();
return false;
}
true === some_function();
那么 some_function 会返回 true 吗?
最佳答案
很简单,不。
关于javascript - 除了异常之外,是否可以在 JavaScript 中实现非本地返回?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4133825/