For example,
//define a template literal
let template = `Hello {target}`;
//Then reuse it, just examples to show the idea
let str1 = Format(template, "World");//str1 becomes "Hello World"
let str2 = Format(template, "There");//str2 becomes "Hello There"
let str3 = Format(template, "There Again");//str3 becomes "Hello There Again"
BTW, it's a common practice to reuse template string by string.Format
in C#:
string template = `Hello {0}`;
string str1 = string.Format(template, "World");//str1 becomes "Hello World"
string str2 = string.Format(template, "There");//str2 becomes "Hello There"
string str3 = string.Format(template, "There Again");//str3 becomes "Hello There Again"
The question is, can it be done with ES6?