Function Overloading in JavaScript
Function Overloading is the ability to define two or more functions with the same name that have a different signature, i.e. a number and/or different types of parameters/arguments. For example: function DoSomething(a) function DoSomething(a,b) function DoSomething(a,b,c) In JavaScript, there is no function overloading. There is however behavior regarding sending different parameters, and there is a pattern we can use to handle function overloading. First, consider the case above. If we … Continue reading Function Overloading in JavaScript