Nested functions are functions whose definition is lexically enclosed inside another function definition. Nested functions are not necessarily available in every language having the concept of function, and the exact meaning of the term varies among languages.