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

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

asp.net mvc 3 - Unexpected "foreach" keyword after "@" character -