JavaScript equivalent to printf/String.Format

Current JavaScript From ES6 on you could use template strings: See Kim’s answer below for details. Older answer Try sprintf() for JavaScript. If you really want to do a simple format method on your own, don’t do the replacements successively but do them simultaneously. Because most of the other proposals that are mentioned fail when a replace string … Read more