How to replace multiple strings with multiple other strings in Javascript?
Question
I have a string called I have cats, dogs, and goats., and I want to replace to I have AA, BB, and CC..
How to make it happen only with one function?
Answer
If you only wanna it happen easily, just need one function to replace all of them.
1 | var str = "I have cats, dogs, and goats"; |
Reference
This is the end of post