I have a variable with a value, let's say
var myVarMAX = 5;
In HTML I have an element with id="myVar"
.
I combine the id
with the string MAX (creating a string myVarMAX
). My question is how can I use this string to access a variable with the same name?