I have an array with the name of some of my variables. Don't ask why. I need to foreach() that array and use the values of it as variables names. My variables exists and contain data.
Example:
myArray = ["variable.name", "variable.age", "variable.genre"];
variable.name = "Mike";
console.log(treat_it_as_variable_name(myArray[0]));
Console should now display: Mike
Is it even possible in javascript?