Is it possible to use named argument in javascript?
E.g.
void method (int a, int b);
method(a:1, b:2);
In javascript you could do this:
function method(foo) {
// use foo.a and foo.b here
}
and then call it like this:
method({ a: 1, b: 2 });
method I defined in my question above?method(int a, int b) and we can changed it - e.g. use php's .attr(...) method.I believe the answer is 'no', but you can come to an approximation by using a single object with names properties/members as the argument to your functions. See here for more details.