Created
March 9, 2021 20:01
-
-
Save NyaGarcia/10c7f1a947896aa7751f9d1735d86dd3 to your computer and use it in GitHub Desktop.
arguments object in an arrow 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
const getArguments = () => Array.from(arguments); | |
console.log(getArguments(1, 2, 3, 4)); | |
// Output: [ƒ (), Object, Object, "/~/index.js", "/~", Window, Window, Object, ƒ c()] | |
console.log(getArguments("arguments", "is", "cool")); | |
// Output: [ƒ (), Object, Object, "/~/index.js", "/~", Window, Window, Object, ƒ c()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment