Im trying to call a returning function inside another returning function but I'm getting myfunctionName is undefined.. here is the code
function(){
...
....
return{
myfunction1: function(param1,param2){
var doSomethingHere;
},
myfunction2: function(){
....
var param1,param2
....
//I get an error here
myfunction1(param1,param2).then(function(return){
console.log(return);
});
}
}
}
so how can I call myfunction1 inside myFunction2 whiouth getting the error "is not defined"