Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Readme.md #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KhushalGupta305
Copy link

Added new javascript question .

Added new javascript question .
Copy link
Owner

@ganqqwerty ganqqwerty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a bit of explanation?

@KhushalGupta305
Copy link
Author

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.

@ganqqwerty
Copy link
Owner

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.

@KhushalGupta305
Copy link
Author

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

Lastly, Can you please merge this PR ?

Thanks.

@ganqqwerty
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants