📜  停止函数 javascript 代码示例

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

代码示例1
function func() {
  if (conditionToStopFunction)
    return; //Nothing after return will be executed
  
  console.log("Hello World"); //This will not be executed if 'conditionToStopFunction' is true
}