Open ZhengXingchi opened 4 years ago
function newObj() { let constructor = [].shift.call(arguments) let obj = new Object() obj._prop_ = constructor.prototype var returnObj = constructor.apply(obj, arguments) return typeof returnObj === 'Object' ? returnObj : obj }