function foo() { var a = arguments.length <= 0 || arguments[0] === undefined ? "foo" : arguments[0]; var b = arguments[1]; }