I have to address an algo problem with vanilla JS. I have a string:
let stringExample = "my {cat} has {2} ears";
And I want to replace it (in order) with an array of replacements
const replaceArray = ["dog", "4"];
So that after the replacement, the stringExample
should be:
"my dog has 4 ears"