by emptysea · 5y ago · 0 comments
e.g.,
Math.max(...Array(100_0000).fill(0))
results in: Uncaught RangeError: Maximum call stack size exceededIt's not at all clear to me why this would be a necessary limit to exist, as functions can't reasonably have more than a few hundred formal parameters so passing 100,000 would always imply using unspread or arguments on the receiver, which could surely trivially handle arbitrarily sized arrays.
OTOH, Webkit and Firefox have arbitrary limits 65537, and 500k args.
https://bugs.webkit.org/show_bug.cgi?id=80797 https://github.com/mozilla/gecko-dev/blob/1475b3b0cb274b2a71...