【初级】原型链输出题

Function.prototype.a = () => alert(1);
Object.prototype.b = () => alert(2);
function A() {}
var a = new A();
a.a();
a.b();
1
2
3
4
5
6
// 输出结果
a.a() 报“Uncaught TypeError: a.a is not a function”
a.b() 显示 alert(2)
1
2
3