Skip to content

Instantly share code, notes, and snippets.

@euank
Created October 6, 2016 04:35
Show Gist options
  • Select an option

  • Save euank/ddf5fb4d51164d59b98e5529c5aa51d4 to your computer and use it in GitHub Desktop.

Select an option

Save euank/ddf5fb4d51164d59b98e5529c5aa51d4 to your computer and use it in GitHub Desktop.
(function() {
Array.prototype.slice.call(arguments).map(
(x) => {
console.log(arguments);
}
);
})(1,2)
// Outputs:
// { '0': 1, '1': 2 }
// { '0': 1, '1': 2 }
(function() {
Array.prototype.slice.call(arguments).map(
function(x) {
console.log(arguments);
}
);
})(1,2)
// Outputs:
// { '0': 1, '1': 0, '2': [ 1, 2 ] }
// { '0': 2, '1': 1, '2': [ 1, 2 ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment