Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialbaderbouta
7,804 PointsDifference between 'parameter' and an 'argument'?
Been wondering what the difference between a 'parameter and a 'argument' is. Thank you.
2 Answers
Antti Lylander
9,686 Pointsfrom 15 sec google search:
"A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method's parameters. Parameter is variable in the declaration of function. Argument is the actual value of this variable that gets passed to function."
Jahanzeb Khan
226 Pointsboth are the same thing.
baderbouta
7,804 PointsThank you for the reply Jahan, I've just learned that they are in fact not the same thing. It is called a parameter at the construct level of the function, and its called an 'argument' at the calling and execution level of a function. Either way, thanks a lot!
Antti Lylander
9,686 PointsAlmost, but not quite.
"A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method's parameters. Parameter is variable in the declaration of function. Argument is the actual value of this variable that gets passed to function."