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

forms - Secure PHP File Upload Script -

PHP: Exploding array elements -

c# - Outlook Add-in,group emails based on color category -