Skip to content

Replace All

Malexion edited this page Oct 31, 2016 · 2 revisions

Replace all instances in target string.

var str = '{0}/path/{0}/{1}'.replaceAll('{0}', 'fish').replaceAll('{1}', 'stix');

console.log(str == 'fish/path/fish/stix');
Clone this wiki locally