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

Get the number of parameters of a function.

Similar: name, length.


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


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

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


References

Clone this wiki locally