function getClass(name) {
switch (name) {
case 'string': return String;
case 'array': return Array;
default: return Object;
}
}
obj = new (getClass());
So could anyone pls explain these codes, I understand new but what is new()?