How to get the number of arguments of a function in Node.js

1 Answer

0 votes
function f(a, b, c, d) {
    console.log(a + ' ' + b + ' ' + c + ' ' + d);
}
 
console.log(f.length);
 
 
 
/*
run:
 
4
 
*/

 



answered Jun 25, 2024 by avibootz

Related questions

...