function customNew(constructor,...args){ } function Foo(name,age){ this.name=name this.age=age this.getName=()=>{ return this.name } } const f=new Foo('liu',20) console.log(f.getName())