Merge pull request #383 from brentguf/methods-for-prototypes
Link errors in Methods for Prototypes
This commit is contained in:
commit
bf14b2ff7a
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ In this chapter we cover additional methods to work with a prototype.
|
||||||
There are also other ways to get/set a prototype, besides those that we already know:
|
There are also other ways to get/set a prototype, besides those that we already know:
|
||||||
|
|
||||||
- [Object.create(proto[, descriptors])](mdn:js/Object/create) -- creates an empty object with given `proto` as `[[Prototype]]` and optional property descriptors.
|
- [Object.create(proto[, descriptors])](mdn:js/Object/create) -- creates an empty object with given `proto` as `[[Prototype]]` and optional property descriptors.
|
||||||
- [Object.getPrototypeOf(obj)](mdn:js/Object.getPrototypeOf) -- returns the `[[Prototype]]` of `obj`.
|
- [Object.getPrototypeOf(obj)](mdn:js/Object/getPrototypeOf) -- returns the `[[Prototype]]` of `obj`.
|
||||||
- [Object.setPrototypeOf(obj, proto)](mdn:js/Object.setPrototypeOf) -- sets the `[[Prototype]]` of `obj` to `proto`.
|
- [Object.setPrototypeOf(obj, proto)](mdn:js/Object/setPrototypeOf) -- sets the `[[Prototype]]` of `obj` to `proto`.
|
||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue