Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Last active March 9, 2021 20:00
Show Gist options
  • Save NyaGarcia/adf678a75e1aa8743963c001b0594d9c to your computer and use it in GitHub Desktop.
Save NyaGarcia/adf678a75e1aa8743963c001b0594d9c to your computer and use it in GitHub Desktop.
Showing arguments object in a traditional function
function getArguments() {
return Array.from(arguments);
}
console.log(getArguments(1, 2, 3, 4));
// Output: [1, 2, 3, 4]
console.log(getArguments("arguments", "is", "cool"));
// Output: ["arguments", "is", "cool"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment