-3

I've found that a lot of developers use arguments and parameters interchangeably and it can sometimes be confusing. I'm hoping to learn the exact difference between the two.

curl
  • 3
  • 3
  • parameter is what you define the function to accept, argument is the data you pass in as a parameter. this isn't really a stack overflow question though – Robbie Milejczak Nov 30 '17 at 14:48

1 Answers1

0

The parameters are the aliases for the values that will be passed to the function. The arguments are the actual values.

var foo = function( a, b, c ) {}; // a, b, and c are the parameters

foo( 1, 2, 3 ); // 1, 2, and 3 are the arguments