Objects have the ability to use data and methods that other objects contain, as long as it lives on the [[prototype]] chain. In this lesson we’ll test this out by adding properties and working with this linkage of properties.
What editor are you using?
Yes yes what editor? It looks like it is evaluating on the fly...
The editor that the author is using is VS Code for sure. And for the live editing features I believe he is using this extension: https://marketplace.visualstudio.com/items?itemName=WallabyJs.quokka-vscode
Thanks! that looks like it is it.
Yes, that is correct Alexander. Also, you'll need to pay for a license to use it.
Thanks for the confirmation Tyler. Maybe smth has changed in this space. As of now there is a community edition with limited features, but it's still pretty awesome! Great find, thx for using it in the course! :)
Thanks, that is awesome. Enjoyed the course as well :)
Awesome! Glad you liked it!
Why do we use Object.sertPrototypeOf( ... ) rather than directly mutating our targets proto property?
for example,
const obj = { firstName: 'Tyler' } const protoObj = { lastName: 'Clark' }
obj.proto= protoObj;
Same effect, right? I do recognize we'll have to manually reset the constructor in an actual inheritance chain with this method, however.
@Tyler When you create an object (putting it into the meomary) does it also create all the other objects that's reference via the proto property so that the initial object have access to all the properties of proto objects?