javascript - How to add self executing function inside a constructor function -


i create constructor like

function foo (){     this.bar=function(){     //something     }; } 

this fine till here wanna add inside self executing function when create object new keyword might this

function foo(){     (function(){     //do create object     })();     this.bar=function(){     //something     }; } 

i want run self executing function when create new object . how can wrote above


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

android - Format a french phone number -