Python has this beautiful function to turn this:
bar1 = \'foobar\' bar2 = \'jumped\' bar3 = \'dog\' foo = \'The lazy \' + bar3 + \' \' + bar2 \' over the \'
In the file
https://github.com/BruceSherwood/glowscript/blob/master/lib/glow/api_misc.js
is a function String.prototype.format = function(args) that fully implements the Python string.format() function, not limited simply to handling character strings.