commit
04c0570e22
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ alert(Object.keys(chineseDictionary)); // hello,bye
|
|||
|
||||
Modern methods to set up and directly access the prototype are:
|
||||
|
||||
- [Object.create(proto[, descriptors])](mdn:js/Object/create) -- creates an empty object with a given `proto` as `[[Prototype]]` (can be `null`) and optional property descriptors.
|
||||
- [Object.create(proto, [descriptors])](mdn:js/Object/create) -- creates an empty object with a given `proto` as `[[Prototype]]` (can be `null`) and optional property descriptors.
|
||||
- [Object.getPrototypeOf(obj)](mdn:js/Object.getPrototypeOf) -- returns the `[[Prototype]]` of `obj` (same as `__proto__` getter).
|
||||
- [Object.setPrototypeOf(obj, proto)](mdn:js/Object.setPrototypeOf) -- sets the `[[Prototype]]` of `obj` to `proto` (same as `__proto__` setter).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue