function Cat(color, name) {
this.color = color
this.name = name
}
function myNew(constructor, ...args) {
const obj = {}
Object.setPrototypeOf(obj, constructor.prototype)
return constructor.aplay(obj, args) || obj
}
const cat = myNew(Cat, 'black', 'KOT')
console.log(cat);