What is the difference between a parameter and an argument? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

What is the difference between a parameter and an argument?

They're both a function thing no? how do they operate and what do they do?

4th Apr 2018, 2:59 PM
DDDD Hikikomori
DDDD Hikikomori - avatar
2 Answers
+ 4
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.
4th Apr 2018, 3:05 PM
Damyan Petkov
Damyan Petkov - avatar
+ 1
Here. This is nice picture that explains it. https://i.stack.imgur.com/ZohYJ.jpg
4th Apr 2018, 3:59 PM
cyk
cyk - avatar