|
You can't. Javascript is loosely typed, so you can't distinguish function signatures based on datatypes of the arguments.
i.e:
int bla(int a, int b)
int bla(double a, double b)
in C++ can both be represented by
function bla(a, b)
in Javascript. As for differing amounts of arguments, Javascript really doesn't care about that either.
function bla(a, b, c)
is pretty much the same as
function bla()
except that in the former, a = arguments[0], b = arguments[1], c = arguments[2] in the namespace of the function.
|