I would like to be able to do something like this:
let className = 'Person';
return new [className](data);
However this gives the following error:
TypeError: "[...] is not a constructor"
I have defined the class using the class keyword, as follows:
class Person extends Entity {...}