自己总结下原型连知识点

自己输入感受下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function A(){
this.fuck = "fuck"
};


A.prototype.fuck = "not fuck";
A.prototype.yeah = "not yeah";


var a = new A()

console.log(a.fuck);
console.log(a.__proto__.fuck);
console.log(a.yeah);


A.shit = "shit";
A.prototype.shit = "no shit";

console.log(a.shit);
console.log(a.__proto__.shit)