Assigning function within function object without invoking the function itself.
- by webzide
Dear experts,
I am trying to assign an function within an function object property without actually invoking then function itself.
for instance,
I have the following function object class definition
function objectOne(name, value, id){
this.name=name;
this.value=value;
this.id=id;
this.methodOne=methodFunction(this);
}
the last line this.methodOne=methodFunction(this); I want to pass the current object to the function but at the same time i don't want to execute the function right now.
But if I do it this way without the bracket this.methodOne=methodFunction then the argument of this object would not be passed as a parameter to the function.
Is there a way to work through this.
Thank you in advance