Use arguments
. You can access it like an array. Use arguments.length
for the number of arguments.
More Related Contents:
- How to receive and maintain values in functions (javascript)
- Set a default parameter value for a JavaScript function
- JavaScript variable number of arguments to function
- Is there a better way to do optional function parameters in JavaScript? [duplicate]
- ES6 destructuring function parameter – naming root object
- jQuery pass more parameters into callback
- What happens if I call a JS method with more parameters than it is defined to accept?
- Multiple arguments vs. options object
- What happens if I call a function with more arguments than it is defined to accept?
- Passing a function with arguments as an argument?
- Pass only the second argument in javascript
- var functionName = function() {} vs function functionName() {}
- I have returned two values but console displaying only one value.. what’s wrong with my code?
- I would like to ask how to explain this (javascript function)
- Simplest/cleanest way to implement a singleton in JavaScript
- JavaScript function aliasing doesn’t seem to work
- How does Asynchronous Javascript Execution happen? and when not to use return statement?
- Improving performance of click detection on a staggered column isometric grid
- How do I sort an array of objects based on the ordering of another array?
- Javascript Array of Functions
- Why do arrow functions not have the arguments array? [duplicate]
- Return value from nested function in Javascript [duplicate]
- jQuery call function from a string [duplicate]
- Remove duplicate objects from an array using javascript
- How can I use optional chaining with arrays and functions?
- Javascript: Get access to local variable or variable in closure by its name [duplicate]
- Lambda function syntax in JavaScript without curly braces
- What are the different ways of writing an IIFE? What are their use cases?
- How to get function body text in JavaScript? [duplicate]
- Why can’t I use a Javascript function before its definition inside a try block?