Does anyone know how could I select a variable from a String in JavaScript? Here's what I'm basically trying to achieve:
var myLang = "ESP";
var myText_ESP = "Hola a todos!";
var myText_ENG = "Hello everybody!";
console.log(myText_ + myLang); // This should trace "Hola a todos!"
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…