arguments and parameters

In programming, when we call a function, we often want to supply it with input that will affect its output.

function logValue (value) {

In the above example, the value 10 passed in as the input to the function is called an argument.

But the value in the function definition at the top is called a parameter.


argument A value provided as input to a function. parameter A variable identifier provided as input to a function.

‘You define parameters, and you make arguments.’

Parameter is variable in the declaration of function.

Argument is the actual value of this variable that gets passed to function.

#programming #review