Skip to content

Instantly share code, notes, and snippets.

@robertocarroll
Created October 20, 2021 08:20
Show Gist options
  • Save robertocarroll/4ca91d4d68bc9d19df9278bbe1e8fb2b to your computer and use it in GitHub Desktop.
Save robertocarroll/4ca91d4d68bc9d19df9278bbe1e8fb2b to your computer and use it in GitHub Desktop.
Difference between parameters and arguments
// 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 when declaring the function
foo( 1, 2, 3 ); // 1, 2, and 3 are the arguments when we pass in when we call the function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment