I know that JavaScript functions can accept "any" number of arguments.
function f(){};
f(1,2,3,4 /*...*/);
But I'm wondering if there is actually a limit to how many "any" can be?
E.g., let's say I hand a million arguments to f()
. Would that work? Or would the interpreter keel over?
I'm guessing the maximum is either (a) implementation-specific or (b) (2^32)-1
, since the arguments
object is array-like.
I don't see this mentioned in the language specification, but I might not be connecting some dots.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…