class Bird { } class createObject { static create(name) {return eval(`new ${name}()`)} ; } console.log(createObject.create('Bird'))