Function

garanews's avatar
Published Mar 11, 2022Updated Oct 26, 2022
Contribute to Docs

Functions hold a distinct place among the data types. They are blocks of code that yield results or perform a specific task. In some programming languages, they are processed as objects of data. This is because in some languages they are derived from objects and its closest classification is with composite data types.

Many languages treat functions as first-class objects, which means:

  • They can be assigned to variables.
  • They can be passed as arguments to or returned by other functions.
  • Start your programming journey with an introduction to the world of code and basic concepts.
    • Includes 5 Courses
    • With Certificate
    • Beginner Friendly.
      4 hours
  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours

Functions in Different Languages

All contributors

Contribute to Docs

Learn General on Codecademy

  • Start your programming journey with an introduction to the world of code and basic concepts.
    • Includes 5 Courses
    • With Certificate
    • Beginner Friendly.
      4 hours
  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours