I know in PHP we can do something like this:
$hello = \"foo\"; $my_string = \"I pity the $hello\";
Output: \"I pity the foo\"<
\"I pity the foo\"
Prior to Firefox 34 / Chrome 41 / Safari 9 / Microsoft Edge, nope, that was not possible in javascript. You would have to resort to:
var hello = "foo"; var my_string = "I pity the " + hello;