wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Overloading in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Overloading in JavaScript" Watch "Overloading in JavaScript" New topic
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: 60774
    
  65

It doesn't.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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: 60774
    
  65

Or check argument types with the typeof operator. But method overloading as it's known in Java does not exist.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Overloading in JavaScript
 
Similar Threads
overlading
Overriding,Overloading methods
method overriding
which method will be called first
java [question -- overloading]