How to access javascript variable value by creating another variable via concatenation?

前端 未结 4 858
醉话见心
醉话见心 2021-01-23 19:21

Please have a look on the following code -

var abc_text = \"Hello\";
var def_text = \"world\";

function testMe(elem) {
    var xyz = elem+\"_text\";
    alert(x         


        
4条回答
提交回复
热议问题