【JS】实现new操作符
https://github.com/zjy4fun/notes/tree/main/demos/js-new
const myNew = (constructorFn, ...args) => {
const obj = Object.create(constructorFn.prototype)
const result = constructorFn.apply(obj, args)
if(typeof result === 'object' && result !== null) {
return result
}
return obj
}