10.4.1.3. Возврат завершает выполнение функции
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!