Skip to content

Instantly share code, notes, and snippets.

@Shavindra
Last active September 24, 2015 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shavindra/11c9c8d70217b8bacd2a to your computer and use it in GitHub Desktop.
Save Shavindra/11c9c8d70217b8bacd2a to your computer and use it in GitHub Desktop.
Fundamentals: get all the arguments in a function
//Function declaration
function foo() {
console.log(arguments);
}
foo(['a', 'b', 'c'], [1, 2, 3, 4, 5]);
//IIFE
(function() {
console.log(arguments);
})(window, document)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment