Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
}
 
PREVIOUS NEXT
Tagged: #stop #function #javascript
ADD COMMENT
Topic
Name
7+9 =