Skip to content

Format String

Malexion edited this page Nov 4, 2016 · 4 revisions

Format a string template.

Should be familiar to those from .net

Examples

var template = '{0}/{1}/{0}';

console.log(template.format('foo', 'bar'));

console.log('{0}/{1}'.format('foo', 'bar'));
Clone this wiki locally