//Code starts
var self = this;
var a=10;
function myFunc(){
this.a = 4;
var a = 5;
console.log("this.a -> " + this.a); //Output: this.a -> 4
console.log("self.a -> " + self.a); //Output: self.a -> undefined
console.log("a -> " + a); //Output: a -> 5
}
myFunc();
//Code ends
Can someone please explain the Output of the above console.log statements. Thank You.
this.aandaare different object