My goal is to name a new variable with the content/string of a different variable.
function foo(id) {
var example + id; // So basically add the id to the example variable making something like example1 etc...
}
foo(1)
example1 = "text"
console.log(example1) // And it logs "text"
Hope that explains it and that you can give a good response thanks!