Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 336 Bytes

README.md

File metadata and controls

5 lines (4 loc) · 336 Bytes

实现一个 new

  • new 一般用来通过构造函数去实例化对象。
  • 通过 new 调用的构造函数必须是有 prototype 原型的函数,箭头函数没有原型,所以没办法通过 new 调用
  • ES6 的类必须使用 new 进行构造实例,此次实现中未实现调用 ES6 的类,还望大神能补充一下