Skip to content

Commit

Permalink
增加 js 原型描述
Browse files Browse the repository at this point in the history
  • Loading branch information
hongjingjun committed Jul 7, 2017
1 parent b978a77 commit 2bd4f24
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mdFile/理解javascript对象、Function和原型.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,10 @@ prototype是函数才具有的属性,由函数创建的所有对象的__proto_
Object.prototype.color = 'white';


__proto__原则上是私有属性,不允许直接操作。也就是说,在new 一个对象时,解析器会自动处理__proto__属性。而程序可控属性是prototype,也就是说,程序通过操作prototype来控制对象间的__proto__原型链。






0 comments on commit 2bd4f24

Please sign in to comment.