Created
September 13, 2025 19:30
-
-
Save addieljuarez/18e6f535fda17ccbd35833449e8b5930 to your computer and use it in GitHub Desktop.
argumentsInFunction.js
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 testArguments () { | |
| console.log('--- arguments ---') | |
| console.log(arguments) | |
| for (let i = 0; i < arguments.length; i++) { | |
| console.log(arguments[i]) | |
| } | |
| } | |
| testArguments(30, [20, 10], 'numero', { data: 'data' }) | |
| // [Arguments] { | |
| // '0': 30, | |
| // '1': [ 20, 10 ], | |
| // '2': 'numero', | |
| // '3': { data: 'data' } | |
| // } | |
| // 30 | |
| // [ 20, 10 ] | |
| // numero | |
| // { data: 'data' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment