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);