var greentext='shopping';
var colors=new Array('green','blue','red','violet','brown');
for(i=0;i<colors.length;i++)
{
//suppose consider colors[i] is green
}
When concatenating colors[i]+'text' and passing to some div using innerHTML, the string "greentext" is passed rather than the value of the concatenated string "shopping". How to pass the value of dynamically created string as above?
Hope my question is clear.....please help me