Return
A return statement returns control from a function or method back to its caller.
Related concepts: FunctionMethodCallControl Flow
Closest Wikipedia entry: Return statement
Misconceptions about Return14 documented Misconceptions
Check YourselfConstructorReturnsObject — Java
Constructors need to return objects
DeferredReturn — Java
A return statement in the middle of a method doesn't return immediately
ReturnCall — Java
Return statements need () around the return value
ReturnUnwindsMultipleFrames — Java
A return statement can unwind multiple call stack frames
UseOfSelfTypeImpliesRecursiveType — Java
If a class has a method that has a local variable, parameter, or return value with the class as its type, the class is a recursive type
VoidMethodReturnsValue — Java
A method with void return type can return a value
ArrowFunctionNoImpliedReturn — JavaScript
Even when an arrow function consists just of an expression, the return keyword must be explicitly written
MapInPlace — JavaScript
Map modifies the elements of the array on which it operates in place
NoReturnValue — JavaScript
Functions without return statements return no value at all
DeferredReturn — Python
A return statement in the middle of a function doesn't return immediately
InitReturnsObject — Python
__init__ needs to return an object
MultipleValuesReturn — Python
Functions can return multiple values
ReturnCall — Python
Return statements need () around the return value
ReturnUnwindsMultipleFrames — Python
A return statement can unwind multiple call stack frames