123-Essential-JavaScript-Interview-Questions icon indicating copy to clipboard operation
123-Essential-JavaScript-Interview-Questions copied to clipboard

Update Readme.md

Open KhushalGupta305 opened this issue 5 years ago • 4 comments

Added new javascript question .

KhushalGupta305 avatar Oct 01 '18 06:10 KhushalGupta305

Explanation:-

In the outer function, both this and self refer to myObject and therefore both can properly reference and access foo.

In the inner function, though, this no longer refers to myObject. As a result, this.foo is undefined in the inner function, whereas the reference to the local variable self remains in scope and is accessible there.

KhushalGupta305 avatar Oct 02 '18 06:10 KhushalGupta305

Thanks for the idea. I think the book deserves the whole chapter about managing this. I will work out 7-10 questions about it, so that everyone can go from one to another gradually.

ganqqwerty avatar Oct 02 '18 08:10 ganqqwerty

Sure thing. Can I also add some more good questions to this Repo ?

Lastly, Can you please merge this PR ?

Thanks.

KhushalGupta305 avatar Oct 02 '18 08:10 KhushalGupta305

No, this one is not yet good enough to be merged, I will need to change it a bit.

ganqqwerty avatar Oct 02 '18 09:10 ganqqwerty