I see a few code project solutions.
But is there a regular implementation in JavaScript?
In C# you can do something like
String.Format("hello {0}, your age is {1}.", "John", 29)
In JavaScript you could do something like
var x = "hello {0}, your age is {1}";
x = x.replace(/\{0\}/g, "John");
x = x.replace(/\{1\}/g, 29);
For those interested, here's an alternative to invoking Array.join:
var arrayOfStrings = ['foo', 'bar'];
var result = String.concat.apply(null, arrayOfStrings);
console.log(result);
The output, as expected, is the string 'foobar'. In Firefox, this approach outperforms Array.join but is outperformed by + concatenation. Since String.concat requires each segment to be specified as a separate argument, the caller is limited by any argument count limit imposed by the executing JavaScript engine. Take a look at the documentation of Function.prototype.apply() for more information.
How about sys.StringBuilder()
try the following article.
https://msdn.microsoft.com/en-us/library/bb310852.aspx
The ECMAScript 6 version (aka ECMAScript 2015) of JavaScript introduced string literals.
var classType = "stringbuilder";
var q = `Does JavaScript have a built-in ${classType} class?`;
Notice that back-ticks, instead of single quotes, enclose the string.