`this` keyword in javascript
Anonymous
function a(){
this.kk="ghf";
}
console.log(kk);
a();
Here I am getting error as "kk is not defined",but if we follow the concept then we can say that this keyword in the above case is creating new global variable kk and while creation phase it should save the variable kk in global execution context.so the value of kk in above case should be undefined instead of error message. As per my knowledge all global variable present in global execution context ,so "kk" should be there. Below is the example for above said hypothesis :
console.log(a)
var a=8;
// output will be undefined