function myNew(Fn) { if(!Fn instanceof Function) { throw new TypeError('Fn must be a function') } let obj = {} obj.__proto__ = Fn.prototype const nowArg = Array.prototype.slice.call(arguments, 1) const result = Fn.apply(obj, nowArg) return result ? result : obj }