I want to wrap each sign in the given array inside a span tag to be able to render it to DOM:
Here is the signs array:
const signs = ['!!', '?!', '!?', '...', '..', '.', '?', '!', ':', '؟!', '!؟', '؟'];
I can replace each sign individually like this:
result = result.replace(/([\:])/g, "<span class='some-class'> :</span>");
The above code put : sign inside a span.
How can I do this for all of array signs without hard coding them?