function add() { let argLength = arguments.length; if(argLength === 0) { ... } else if(argLength === 1) { ... } ... }