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
var test={"abc":"Hello", "def":"World"}; function testMe(elem) { var xyz = test[elem]; alert(xyz); } testMe("abc"); testMe("def");