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
If they are variables in the window scope, then you can access window['option'+i]. However, you really should just use an array:
window
window['option'+i]
var option = [ "some text", "option 2", "option 3" ]; for( var i=0; i<3; i++) alert(option[i]);