here is a simple example about 'this' keyword
var a = 10;
var obj = {
a: 20
};
function fn() {
console.log(this.a);
}
fn(); // 10
fn.call(obj); // 20
however, when I try to run it, the result shown as below.
undefined
20
why the first call return undefined? I don't get it. Can somebody help explain it to me? Many thanks