Adds overloading and default values to function handling in JavaScript