Answers for "10.4.1.3. return Terminates Function Execution"

0

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!
Posted by: Guest on June-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language