Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active November 27, 2023 10:03
Show Gist options
  • Select an option

  • Save Integralist/7694814 to your computer and use it in GitHub Desktop.

Select an option

Save Integralist/7694814 to your computer and use it in GitHub Desktop.
[The distinction between "arguments" and "parameters"] #args #params #vs
/*
Arguments are used when a function is being called.
We pass arguments to functions.
Parameters are set up when the function is defined.
So it is said that parameters are used to define a function and arguments are used to invoke a function.
These words are typically interchangeable but knowing the distinction can be handy.
*/
var myFunction = function(x,y,z){ // x,y,z are parameters
return x+y+z
};
myFunction(1,2,3); // 1,2,3 are arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment