Let's say I have an object
const myArray = {
a : "hello"
}
and I have a string with the same name of that object like
var type ="myArray";
when I do console.log(type);
output: myArray
but I want to out that object to the console which has the same name as the value of variable type. How should I do that? Thanks in advance