4 ms·
I learned about it in the Ruby world. Also, interestingly, it was available from Javascript 1.2 to 1.4: https://developer.mozilla.org/en-US/docs/Web/JavaScript
by pmarreck 7y ago
I learned about it in the Ruby world.
Also, interestingly, it was available from Javascript 1.2 to 1.4: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/arity https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I think it's a useful name for a useful concept, not sure why they'd take it out, "Function.prototype.length" is a much poorer replacement semantically (but hey, Javascript isn't known for its correctness or well-thought-out design...)