function mynew(fn) {
return function() {
let obj = {
__proto__:fn.prototype
}
fn.apply(obj,arguments)
return obj
js new 的原理
原文:https://www.cnblogs.com/liuhp/p/12218737.html