Quote Originally Posted by Psytherium
I just don't see why if inside the nested function testResult prints out the desired value, why it isn't returned.
Well, in your examples, the return call is not inside the function that contains the variable to be returned.