Answers for "stop a function javascript"

1

stop a function javascript

function func() {
  if (conditionToStopFunction)
    return; //Nothing after return will be executed
  
  console.log("Hello World"); //This will not be executed if 'conditionToStopFunction' is true
}
Posted by: Guest on May-20-2020

Code answers related to "stop a function javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language