在调用new的过程中发生了4件事:
1、新生成了一个对象;
2、为这个新生成的对象指定了原型;
3、绑定this;
4、返回新对象;
function myNew() {
let obj = {};
let Constructor = [].shift.call(arguments);
obj.__proto__ = Constructor .prototype;
let result = Constructor .apply(obj, arguments);
return result instanceof Object ? result : obj
}