I need help figuring out how to convert a string within an array into a class instance. The following code snippet is similar to what I'm working on:
var elements = ["({x: 0, y: 0, width: 100, height: 100})", "({x: 10, y: 10, width: 70, height: 70})"];
for(var i = 0; i < elements.length;i++) {
var objClass = new window[elements[i]];
console.log(objClass.width);
}