Skip to content
Subhajit Sahu edited this page Aug 7, 2022 · 1 revision

Get the number of parameters of a function.

Similar: name, length.


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


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

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


References