Reputation: 1228
I have:
String.prototype.callcm = function(something[]){
alert(something);
};
"something".callcm({a:50,b:60});
how can the arguments with there variable name get in the something array.
Upvotes: 1
Views: 98
Reputation: 79850
I think you are asking for a way to pass the values {a:50,b:60}
to the function.. then you just need to fix the syntax.
Change function(something[])
to function(something)
jsFiddle here
Upvotes: 1