new 做了什么
var a=function(){ this.che1 = function () { console.log(1) } this.che2 = function () { console.log(2) } this.che3=function(){console.log(3)} } var b= new a(); var c={}; c.__proto__ = a.prototype; a.call(c); console.log(b) console.log(c)
var a=function(){ this.che1 = function () { console.log(1) } this.che2 = function () { console.log(2) } this.che3=function(){console.log(3)} } var b= new a(); var c={}; c.__proto__ = a.prototype; a.call(c); console.log(b) console.log(c)