Python has this beautiful function to turn this:
bar1 = \'foobar\' bar2 = \'jumped\' bar3 = \'dog\' foo = \'The lazy \' + bar3 + \' \' + bar2 \' over the \'
There is a way, but not exactly using format.
var name = "John"; var age = 19; var message = `My name is ${name} and I am ${age} years old`; console.log(message);
jsfiddle - link