Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function test3(name, age, height) {
- console.log(name + " is " + age + " years old and " + height + " inches tall");
- }
- function test1(name) {
- console.log(name + " is a wizard");
- }
- function test() {
- var name = "test" + arguments.length;
- if (name in this) {
- this[name].apply(this, arguments);
- } else {
- throw new Error("invalid argument count");
- }
- }
- test("bryce");
- test("bryce", 25, (5*12)+11);
- test("bryce", 25);
Add Comment
Please, Sign In to add comment