dmartinezla
2/13/2017 - 11:11 AM

From https://coderwall.com/p/flonoa/simple-string-format-in-javascript

String.prototype.format = function() {
  a = this;   
  for (var k in arguments) {  
    a = a.replace("{" + k + "}", arguments[k])   
  }

  return a
}
console.log("Helo, {0}".format("World"));