new的时候发生了什么?

<script> const newFn = function (C, ...args) { /** * 建立对象,将其__proto__关联到构造器的prototype * 设置原型 * 判断返回值 * 输出 * */ // const obj = Object.create(C.prototype); /* 等价于
相关文章
相关标签/搜索