var CoreGroups = new function(){
this.name = function(){return 'name test'};
var functionName = function(){
// here I want to call the name() function
a = this.name(); // doesnt work: this.name is not a function
b = name(); // doesn't work too: name is not defined
}
}
Any idea on how to call the name() function from the functionName() function? Thanks! ;)