I know you might think this is a duplicate or a dumb question. But the answers doesn't help me.
Here's my simple problem:
var option1 = "some text";
var option2 = "some text";
var option3 = "some text";
I want to access the elements "option1, option2, option3" in a for loop:
for(var i = 1; i < 4; i++)
{
alert(option+i);
}
I know that it shouldn't be option+i but I dont know how to solve this.
Thanks for the help in advance.
If you find this to be a duplicate just mark this question. Thanks