Answer the question
In order to leave comments, you need to log in
Call an object method with its parameters as arguments?
In general, there is an object A
function ff(x,y){
console.log(x,y);
}
var a = {
a:'Hello',
b:'World',
c:ff(a,b)
};
a.c();
Answer the question
In order to leave comments, you need to log in
Already found)
Suddenly useful to someone)
function ff(x,y){
console.log(x,y);
}
var a = {
a:'Hello',
b:'World',
c:function(){
ff(this.a,this.b);
}
};
a.c();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question