1 | Functions may take an arbitrary number of arguments: function User() { this.name = User.arguments[0]; this.group = User.arguments[1]; this.email = new Array(); var n = User.arguments.length; for (var i = 2; i < n; i++) this.email[i-2]=User.arguments[i]; } |
2 | Note: the arguments[] array is built in |