Last active
March 9, 2021 20:00
-
-
Save NyaGarcia/adf678a75e1aa8743963c001b0594d9c to your computer and use it in GitHub Desktop.
Showing arguments object in a traditional function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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