function newMethods(fn, ...args) { const obj = {} obj.__proto__ = fn.prototype fn.apply(obj, args) return obj } function Person(a) { this.a = a } const kk = newMethods(Person, 89) console.log(kk)