Argument
Published Apr 23, 2021Updated Oct 26, 2022
Contribute to Docs
An argument is the actual value of a variable (aka. the parameter) passed into a function.
Example
Suppose we have a function called tripleThis()
:
function tripleThis(x) {return x * 3;}tripleThis(6);
The parameter is x
since it is the variable. The argument is 6
since it is the actual value.
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn more on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours - Course
Learn Python 3
Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today.With CertificateBeginner Friendly23 hours