I want to be able to pass a string into a function, concatenate it with a common suffix, and use that new string as an existing variable. For example,
var firstInfo = "The first string says this.";
var secondInfo = "The second says that.";
updateInfo(arg)
{
console.log(arg + "Info");
}
updateInfo("first");
/* Should print "The first string says this.", but instead does nothing. */
What am I doing wrong? This is plain javascript, but I am open to other libraries.