1 | { |
运行结果:
1 | a1 |
解析:
- Person.a 是function Person()函数,所以结果为:a1
- yideng 是 new Person()对象,所以结果为:a
- 1..a 是Number(1).a,也是对象,所以结果为:a,特殊转换 +1 1.
- 1.a 报错
yideng.__proto__.__proto__.constructor是Persoon()对象的proto下的constructor 内置函数,结果为:ƒ Function() { [native code] }
1 | { |
运行结果:
1 | a1 |
解析:
yideng.__proto__.__proto__.constructor 是Persoon()对象的proto下的constructor 内置函数,结果为:ƒ Function() { [native code] }