JavaScriptEasy
What is the difference between a parameter and an argument?
By FrontendPro Editorial Team Updated 8/8/2026
#JavaScript
Answer
A parameter is a variable in the declaration of a function, while an argument is the actual value passed to the function when it is called. For example, in the function function add(a, b) { return a + b; }, a and b are parameters. When you call add(2, 3), 2 and 3 are arguments.
