Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeConcepts
Function

Function

A function produces a return value from a list of argument values.

Related concepts:  OperatorParameterArgumentReturnMethod

Closest Wikipedia entry:  Subroutine

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Function is based on principled authoritative sources such as:

nLab - Section function
Types and Programming Languages - Section 5.1

Misconceptions about Function
15 documented Misconceptions

Any LanguageJavaJavaScriptPythonScratch
Check Yourself
Misconception
ArrowFunctionNoImpliedReturn
Even when an arrow function consists just of an expression, the return keyword must be explicitly written
Misconception
ArrowFunctionRequiresFunctionKeyword
Arrow functions also require the keyword 'function'
Misconception
CallbackParametersInCaller
Parameters of a callback function may be written as parameters of the caller function
Misconception
FunctionAsValueWithParentheses
To use a function as a value, one needs to have parentheses after its name
Misconception
FunctionOverloading
It is possible to create multiple functions with the same name but with different signatures
Misconception
FunctionsCannotBeImmediatelyInvoked
Functions cannot be called in the expression in which they are defined
Misconception
FunctionsMustBeNamed
Every function definition requires an associated name
Misconception
NoFunctionCallsChaining
It is not allowed to chain function calls
Misconception
NumberOfParametersMatchArguments
Functions must be called with the same number of arguments as defined in their signature

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors