Tell us what’s happening:
I ran through two different methods on this, for loop with the string and splitting and iterating over the array… then I realize the function i was using in my other solutions could just do everything… so i did that. Is there a practical reason you wouldn’t want to do this?
Trying not to post a working solution… not sure how to hide that yet. Your code so far
return str.replaceAll(args) //repeated for each character
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
There’s nothing wrong with chaining methods. Sometimes if you find yourself copy-pasting the same thing (with variations) that is an indication that there might be a more concise way to do, so it’s always something to give thought to.