两种添加prototype属性的写法有什么不同?
例如:
var a=function(){};a.prototype.B=function(){console.log(ok);};

var a=function(){};a.prototype={B:function(){console.log(ok);}};
😭😭真的不知道啊
展开
7