如果我在函数里面调用另一个函数,怎么退出主/父函数?函数里面的函数,如何退出主函数
e.g:
function(firstFunction(){
//stuff
secondFunction()
// stuff if second function doesnt exit
}
function secondFunction(){
if(// some stuff here to do checks...){
/***** Exit from this and firstFunction, i.e stop code after this function call from running ****/
}
}
你不这样做,没有解决办法的一点点。没有直接的方法。 –