Confusion in exaple 2 and 3

Hey is example 2 val + delta is getting executed while return 5 is not working in example , why explain
while in both the programs inner function is not called anywhere

please share the exact timestamp, where you encountered this problem