Контекст

function A() {
    this.getClass = function() {
        return window[this.constructor.name];
    }
 
    this.getNewInstance = function() {
        return new window[this.constructor.name];
    }
}
 
var a = new A();
console.log(a.getClass());  //  function A { // etc... }
 
// you can even:
var b = new a.getClass();
b instanceof A; // true
function B() {};
 
B.getClass = function() {
    return window[this.name];
}
 
B.getInstance() {
    return new window[this.name];
}