8.4 Prototype methods... - Fix code typo
Move comma before square bracket Object.create(proto[, descriptors])
This commit is contained in:
parent
445bda3980
commit
38526232a6
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ The `__proto__` is considered outdated and somewhat deprecated (in browser-only
|
|||
|
||||
The modern methods are:
|
||||
|
||||
- [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.setPrototypeOf(obj, proto)](mdn:js/Object/setPrototypeOf) -- sets the `[[Prototype]]` of `obj` to `proto`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue