Corrected the reasoning in the 'Step into' command explanation and made the `Making bound methods with class fields` section easier to understand. by singhal-shagun · Pull Request #3972 · javascript-tutorial/en.javascript.info
Repository navigation
Corrected the reasoning in the 'Step into' command explanation and made the Making bound methods with class fields section easier to understand. - #3972
Open
singhal-shagun wants to merge 3 commits into javascript-tutorial:master from singhal-shagun:master
Open
Corrected the reasoning in the 'Step into' command explanation and made the Making bound methods with class fields section easier to understand. #3972
singhal-shagun wants to merge 3 commits into
javascript-tutorial:master from
singhal-shagun:master
Conversation
singhal-shagun commented Jun 19, 2026
Copy link Copy Markdown
This pull request make the following improvements in the literature:
- Corrected the reasoning as to why beginner-level Javascript learners can ignore the
3.1 Debugging in the browser --> "Step into", hotkey F11writeup. - The
9.1 Class basic syntax --> Making bound methods with class fieldswriteup has been made easier to understand.
Updated why beginners can ignore the 'Step into' command explanation
fd4c225
Corrected a section of the writeup on 'Step into' command pertaining to beginners. Instead of "as we don't have asynchronous calls yet", I suggest the words to be "as we haven't learnt about asynchronous calls yet". The former suggests that Javascript lacks the ability to make asynchronous calls, which is not the case, in my opinion.
Made the section on bound methods easier to understand.
598d566
.
d3e1443
javascript-translate-bot
added
review needed
Review needed, please approve or request changes
labels
Jun 19, 2026
javascript-translate-bot
requested a review
from a team
June 19, 2026 07:40
singhal-shagun
marked this pull request as ready for review
June 19, 2026 07:41
smith558 commented Jul 25, 2026
Copy link Copy Markdown
Member
|
@codex review |
Bot
reviewed Jul 25, 2026
View reviewed changes
chatgpt-codex-connector
Bot
left a comment
Copy link Copy Markdown
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3e1443ba7
Your team has set up Codex to review pull requests in this repo . Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Comment thread 1-js/09-classes/01-class/article.md| As demonstrated in the chapter <info:bind> functions in JavaScript have a dynamic `this`. It depends on the context of the call. | ||
|
|
||
| So if an object method is passed around and called in another context, `this` won't be a reference to its object any more. | ||
| Recall the **"losing `this`"** problem from the chapter <info:bind>. Functions in JavaScript have a dynamic `this` -- it depends on how the function is called, not where it's defined. So, when an object method is passed around (e.g. as a callback to `setTimeout`, or as an event handler), `this` no longer points to the original object. |
singhal-shagun commented Jul 26, 2026 · edited Loading
Copy link Copy Markdown
Author
|
Codex seems to have skipped the method vs function distinction in my writeup! To clarify things, I clearly wrote the following in my writeup:
The intention is to convey to the reader that this third solution is applicable only to methods, not to functions in general. Also, the original wirteup made no clarification as to what it meant by "bound methods". My writeup makes it explicit, making it easier for the reader to understand what the article intends to convey. |