| Author |
Overloading in JavaScript
|
Dan Silva
Ranch Hand
Joined: Sep 05, 2007
Posts: 86
|
|
|
How does overloading in JavaScript work? I'm trying to do it, but it doesn't seem to like it.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56150
|
|
|
It doesn't.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Most people will add an object to the end and add any differences there. also you can check the arguments.length; Eric
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56150
|
|
|
Or check argument types with the typeof operator. But method overloading as it's known in Java does not exist.
|
 |
 |
|
|
subject: Overloading in JavaScript
|
|
|