function func1(a, b, c) {
console.log(arguments.length);
}arguments.length / notebook
arguments.length
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
function adder(base /*, num1, …, numN */) {
base = Number(base);
for (let i = 1; i < arguments.length; i++) {
base += Number(arguments[i]);
}
return base;
}