3
Follow the code below:
Javascript:
var img1 = false;
var img2 = true;
var img = "img"+1; //Resultado da variavel img é "img1".
//Como converter string para variável ?
//Exemplo: "img1" para img1
if (img == false) //Errado ----> "img1" == false
{ //Certo -----> img1 == false ou seja false = false
}
Some solution ?
Why don’t you use a array? It’s so much better and you don’t need this gambit..
– Maniero
You can give a concrete example of what you need to do?
– Sergio
Hi @bigown, can you believe
– Matheus Miranda