Parameter and Argument terminologies are quite confusing for software engineers and programmers regarding function. Difference between Parameter vs Arguments in functions or methods is very simple;
Parameter of function or method
The variable name used to store the information
Argument of function or method
The information or value supplied for parameter when calling the function
Example
function minus(x, y){
return x - y;
}
minus(5,2);
in the example above, x
and y
are called parameters whereas 5
and 2
are called their arguments, respectively.
Summary
The variable name used to store the information is called parameter where as the information or value supplied for parameter when calling the function is called the argument.
Posted Status in Programming