Question: For the following piece of code

```
a.b = function c(){
    return function e(){
        return this;
    };
};
d = a.b();

```

What will the value of d() be? This might not be a very good example, but I am just confused about what "this" will refer to.

Thanks,

Answer: 
Seeing as d will now equal a FUNCTION, "this" will be evaluated to whatever function calls it. It hasn't actually been evaluated yet.

At the end of execution, `d='function e() { return this; }'`, so the moment you execute `d()` is when `this` will be evaluated.
`this` is a reference to the object on which method was called.
`d()` is similar `window.d()` (if there is no `with` instruction)