If you use a property Function.length, you get the total number of arguments that the function expects.
However, according to the documentation (as well as its attempts), it does not include the default parameters in the counter.
This number excludes the stop parameter and includes only parameters up to the first with the default value - Function.length
Is it possible for me to somehow get a counter (outside the function) that also includes default parameters?
source
share