mdn / sprints

Archived: MDN Web Docs issues are tracked in the content repository.
https://github.com/mdn/content
Creative Commons Zero v1.0 Universal
151 stars 144 forks source link

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes #3993

Closed anton-kuleshoff closed 3 years ago

anton-kuleshoff commented 3 years ago

Request type

Details

Incorrect and confusing text on the English version of "Object prototypes" page: "The former is the property on each instance, and the latter is the property on the constructor. That is, Object.getPrototypeOf(new Foobar()) refers to a different object than Foobar.prototype." They actually refers to the same object.

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes

hamishwillee commented 3 years ago

@chrisdavidmills This may seem familiar ...

chrisdavidmills commented 3 years ago

@hamishwillee yup, I know we discussed this before...I just couldn't find the previous issue ;-)

hamishwillee commented 3 years ago

@chrisdavidmills I was teasing :-) Duplicate-ish here https://github.com/mdn/content/issues/1491 and my whinge here https://github.com/mdn/content/pull/1890#issuecomment-770572970

anton-kuleshoff commented 3 years ago

This part of the article lacks a graphic illustration like this one: http://dmitrysoshnikov.com/wp-content/uploads/2017/11/js-constructor.png (taken here http://dmitrysoshnikov.com/ecmascript/javascript-the-core-2nd-edition/). A drawing like this can perfectly demonstrate the difference between __proto__ and the .prototype constructor property, etc.

chrisdavidmills commented 3 years ago

I believe this wording got fixed.