What is the difference between arguments and parameters?

Post Reply
JefferyAExley
Newbie
Posts: 1
Joined: Wed May 07, 2025 4:47 am

What is the difference between arguments and parameters?

Post by JefferyAExley »

I think I understand, but I would like to explain a little more.

From what I gather, these two terms are often used interchangeably, but technically they have distinct roles depending on the context.

Parameters are variables listed in the function definition — they act as placeholders.

Arguments, on the other hand, are the actual values ​​that you pass into the function when you call it. These values ​​are assigned to parameters.

Is that explanation correct?
bens
Advanced member
Posts: 282
Joined: Thu Mar 03, 2011 10:13 am

Re: What is the difference between arguments and parameters?

Post by bens »

That is correct. Different programming and scripting languages sometimes interpret or define these terms differently, but your explanation is the most commonly used one - when the difference matters.

Code: Select all

async function add( x, y ) {
return x + y
}

add( 3, 7 )
x and y are parameters, 3 and 7 are arguments.
Post Reply