Skip to content
Subhajit Sahu edited this page Jul 22, 2022 · 2 revisions

Get the number of parameters of a function.

Similar: name, length.


function length(x)
// x: a function
const {length} = require('extra-function');


length(() => 0);
// → 0

length((x, y) => 0);
// → 2


References

Clone this wiki locally