Function
A function produces a return value from a list of argument values.
Related concepts: OperatorParameterArgumentReturnMethod
Closest Wikipedia entry: Subroutine — In computer programming, a function (also procedure, method, subroutine, routine, or subprogram) is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times. Callable units provide a powerful programming tool. The primary purpose is to allow for the decomposition of a large and/or complicated problem into chunks that have relatively low cognitive load and to assign the chunks meaningful names (unless they are anonymous).
Misconceptions about Function15 documented Misconceptions
Check YourselfArrowFunctionNoImpliedReturn — JavaScript
Even when an arrow function consists just of an expression, the return keyword must be explicitly writtenArrowFunctionRequiresFunctionKeyword — JavaScript
Arrow functions also require the keyword 'function'CallbackParametersInCaller — JavaScript
Parameters of a callback function may be written as parameters of the caller functionDeferredReturn — Python
A return statement in the middle of a function doesn't return immediatelyFunctionAsValueWithParentheses — JavaScript
To use a function as a value, one needs to have parentheses after its nameFunctionOverloading — JavaScript
It is possible to create multiple functions with the same name but with different signaturesFunctionsCannotBeImmediatelyInvoked — JavaScript
Functions cannot be called in the expression in which they are definedFunctionsMustBeNamed — JavaScript
Every function definition requires an associated nameMultipleValuesReturn — Python
Functions can return multiple valuesNoFunctionCallsChaining — JavaScript
It is not allowed to chain function callsNumberOfParametersMatchArguments — JavaScript
Functions must be called with the same number of arguments as defined in their signatureOutsideInFunctionNesting — Python
Nested function calls are invoked outside inOutsideInMethodNesting — Java
Nested method calls are invoked outside inParenthesesOnlyIfArgument — Python
() are optional for function calls without argumentsReturnCall — Python
Return statements need () around the return value