Last active
December 16, 2015 03:49
-
-
Save binnng/5372523 to your computer and use it in GitHub Desktop.
Object.create创建对象, 疑惑的地方。具体看代码
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var O = {a: 1}; | |
var n = Object.create(O, { | |
a: { | |
value: 2 | |
} | |
}); | |
console.log(n); //{a: 1} | |
console.log(n.a); //2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我发现似乎只有这样才能选出,他提供的这些配置好像没用(≧m≦)
这算个鸟啊 都不覆盖