Function.length no longer counts default parameters

Published: | Categories: JavaScript | Creative Commons BY-SA 3.0


The Function.length property, indicating the number of arguments the function expects, has previously included parameters with default values. This was fixed not to include those parameters. So (function (a, b, c = false) {}).length will be 2 instead of 3.