Function overloading for javascript.