Different sources explain it in a different ways. In the below example, which are arguments and which are parameters?
const add = function(number1, number2){
return number1 + number2
}
add(3,10)
thanks!
Edit: as another user pointed out, this is a duplicate. What is the difference between arguments and parameters in javascript?
Arguments are what's passed to a function at runtime. Parameters are what are defined in the function definition and alias the arguments.
Parameters are variables listed as a part of the function definition.
Arguments are values passed to the function when it is invoked.
Source: https://codeburst.io/parameters-arguments-in-javascript-eb1d8bd0ef04
function moo(number1, number2) {} // parameters are defined
moo(10, 50, 100); // arguments are passed.
// notice that more than the specified number of parameters
// can be supplied and accessed via 'arguments'
Also see arguments:
arguments is an Array-like object accessible inside functions that contains the values of the arguments passed to that function.