Skip to content

Commit

Permalink
edit assignment wording so it doesn't feel as if it's the first time …
Browse files Browse the repository at this point in the history
…the learner is hearing about the `this` keyword
  • Loading branch information
takinabradley committed Jul 3, 2024
1 parent 4cad12f commit 19da94c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ If we had used `Object.setPrototypeOf()` in this example, then we could safely e
1. Read up on the concept of the prototype from the articles below.
1. Read the article [Understanding Prototypes and Inheritance in JavaScript](https://www.digitalocean.com/community/tutorials/understanding-prototypes-and-inheritance-in-javascript) from Digital Ocean. This is a good review of prototype inheritance and constructor functions, featuring some examples.
1. To go a bit deeper into both the chain and inheritance, spend some time with [JavaScript.Info's article on Prototypal Inheritance](http://javascript.info/prototype-inheritance). As usual, doing the exercises at the end will help cement this knowledge in your mind. Don't skip them! Important note: This article makes heavy use of `__proto__` which is not generally recommended. The concepts here are what we're looking for at the moment. We will soon learn another method or two for setting the prototype.
1. Take another look at [JavaScript Tutorial's article on the `this` keyword](https://www.javascripttutorial.net/javascript-this/), paying more attention to it's use with constructor functions this time.
1. You might have noticed us using the this keyword in object constructors and prototype methods in the examples above.
1. [JavaScript Tutorial's article on the `this` keyword](https://www.javascripttutorial.net/javascript-this/) covers how this changes in various situations, including examples with constructor functions and the prototype.

</div>

Expand All @@ -294,4 +295,3 @@ This section contains helpful links to related content. It isn't required, so co
- This [`Object.create` method video by techsith](https://www.youtube.com/watch?v=MACDGu96wrA) provides another point of view on how to use `Object.create` to extend objects by setting the prototype.
- The first answer on this StackOverflow question regarding [defining methods via the prototype vs in the constructor](https://stackoverflow.com/questions/9772307/declaring-javascript-object-method-in-constructor-function-vs-in-prototype/9772864#9772864) helps explain when you might want to use one over the other.
- [Interactive Scrim on objects and object constructors.](https://scrimba.com/scrim/co2624f87981575448091d5a2)
- Check out this video explanation on the [`this` keyword from DevSage](https://www.youtube.com/watch?v=cwChC4BQF0Q) that gives a different perspective on how its context changes, as well as scenarios in which `this` behaves unexpectedly.

0 comments on commit 19da94c

Please sign in to comment.