Sprintf in Javascript (string format)


/ Published in: JavaScript
Save to your folder(s)

Example:

`var result = "Hello {0}! This is {1}.".format("world","foo bar");`

Returns:

`"Hello World! This is foo bar."`

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.