Here, the property "self" is given a value as "this". what will be output of the current scenario
var obj = {
foo: "bar",
self: this,
myfunc: function() {
console.log("1 " + obj.foo);
console.log("2 " + self.foo);
(function() {
console.log("3 " + obj.foo);
console.log("4 " + self.foo);
})();
}
};
obj.myfunc(); //invoking the object's function