function Fun(name,age){
this.name=name;
this.age=age;
return {
a:1,
b:2
};
}
function myNew(){
let obj={};
Constructor=[].shift.call(arguments);
obj.__proto__=Constructor.prototype;
let result=Constructor.apply(obj,arguments);
return typeof result==='object'?result:obj;
}
var a=myNew(Fun,'shuai',25)