Is there a way to replace two or more instances at once with a single replace call?
I have not attempted anything yet, as I am unsure of how to proceed.
let links = {
_init: "https://%s.website.com/get/%s",
}
Here, you can see that I have a link with 2 instances of %s that I want to replace. I am considering something like this:
links._init.replace('%s', 'name', 'query')
Of course, this will not work. I am curious if there is an alternative method to achieve this. I am aware that languages such as Python and C# offer similar functionality.