Function
A function produces a return value from a list of argument values.
Related concepts: OperatorArgumentReturnMethod
Closest Wikipedia entry: Subroutine — In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions may be defined within programs, or separately in libraries that can be used by many programs.
Misconceptions about Function15 documented Misconceptions
Check YourselfDeferredReturn
A return statement in the middle of a function doesn't return immediatelyMultipleValuesReturn
Functions can return multiple valuesOutsideInFunctionNesting
Nested function calls are invoked outside inParenthesesOnlyIfArgument
() are optional for function calls without argumentsReturnCall
Return statements need () around the return value