aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Overloading in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 56150
    
  13

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
    
    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: 56150
    
  13

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
Overriding,Overloading methods
which method will be called first
overlading
method overriding
java [question -- overloading]