mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-05 22:38:31 +00:00
commit
3ceee98134
@ -342,7 +342,7 @@ myPrototype.meaningOfLife = 43;
|
|||||||
myObj.meaningOfLife; // = 43
|
myObj.meaningOfLife; // = 43
|
||||||
|
|
||||||
// We mentioned that __proto__ was non-standard, and there's no standard way to
|
// We mentioned that __proto__ was non-standard, and there's no standard way to
|
||||||
// change the prototype of an existing object. However, there's two ways to
|
// change the prototype of an existing object. However, there are two ways to
|
||||||
// create a new object with a given prototype.
|
// create a new object with a given prototype.
|
||||||
|
|
||||||
// The first is Object.create, which is a recent addition to JS, and therefore
|
// The first is Object.create, which is a recent addition to JS, and therefore
|
||||||
|
Loading…
Reference in New Issue
Block a user