Guest User

Untitled

a guest
Oct 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. function test3(name, age, height) {
  2. console.log(name + " is " + age + " years old and " + height + " inches tall");
  3. }
  4.  
  5. function test1(name) {
  6. console.log(name + " is a wizard");
  7. }
  8.  
  9. function test() {
  10. var name = "test" + arguments.length;
  11. if (name in this) {
  12. this[name].apply(this, arguments);
  13. } else {
  14. throw new Error("invalid argument count");
  15. }
  16. }
  17.  
  18. test("bryce");
  19. test("bryce", 25, (5*12)+11);
  20. test("bryce", 25);
Add Comment
Please, Sign In to add comment