Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

10.4.1.3. return Terminates Function Execution

/*This console.log statement in this function never executes, since the 
function returns before it is reached.*/

function pastThePointOfReturn() {
   return "I'm done!";
   console.log("This will not be printed");
}

console.log(pastThePointOfReturn());

//I'm done!
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #return #Terminates #Function #Execution
ADD COMMENT
Topic
Name
6+2 =