10.4.1.3. Le retour termine l'exécution de la fonction
def print_nums(x):
for i in range(x):
print(i)
return
print_nums(10)
Courageous Caiman
def print_nums(x):
for i in range(x):
print(i)
return
print_nums(10)
/*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!