Skip to content

Tag: str-replace

How to use “for” along with string replace?

I want to make several replacements in the same string. I have this: after the replacements it should look like this: So I tried: but it doesnt seem to do anything. What is wrong? Answer The way you wrote it now, it will only replace on the last id and assign it to the mylist variable, because .replace does n…