Tag Archives: Overloading

Overloading vs Overriding in JavaScript

JavaScript does not support overloading. JavaScript supports overriding, so if you define two functions with the same name, the last one defined will override the previously defined version and every time a call will be made to the function, the last defined one will get executed. Example: <script type=”text/javascript”> function sum(x, y, z) { return… Read More »