Hi Javascript developers i am facing an issue about bold the string that is enclosed inside of square brackets. I have a string that is dynamically generated and the string look like
[Number] years of practice in accounting and financial administration. Showcased skills in [Area of Expertise]
I want to bold every letter inside a string that is enclosed inside the square bracket just like the above string ( [Number], [Area of Expertise] ).
Like Number and Area of Expertise must be bold. Remember that the string is dynamic.
Please see below snippet.
Also, it's a good idea to html-escape the string before doing the replacement, and generally before inserting dynamic content into the DOM (read more).