Let's suppose I have an object like this in javascript:
obj = {
prop1 : 0,
prop2 : 1,
func1 : function (){
var x = {
func_Inner : function(){
//ATTEMPTING TO CALL FUNC2 ON obj WON'T WORK
this.func2()
//NEITHER THIS
this.func2().bind(obj);
}
}
x.f()
this.func2()
},
func2 : function (){
console.log(this)
console.log(this.prop1,this.prop2)
}
}
I'd like to call func2 from inside func_Inner , how could I?