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
You can eval xyz, but it's better to store abc_text and def_text in associative array or in object;
var text = {"abc" : "Hello", "def" : "Word"};