javascript - How to call a sibling method in an object defined with object syntax? -


how this?

var obj = {  func1 : function(){    // stuff   },  func2 : function(){   func1();  // not work   this.func1();  // not work  } } 

edit: missed semicolon

var obj = {  func1 : function(){    // stuff   },  func2 : function(){   obj.func1();  // works fine  } } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -