Due to lack of new keyword , will variable myFun be assigned to correct object and this.name remains undefined or window.name is assigned with “hello” , but variable myFun remains undefined . Can anyone clarify on this ?
This is another homework question. You have an invalid function in your example because it has no parameter list. I recommend that you log the this keyword, to learn what happens with it from there.