In this task, the task is to convert as many html tags as you want. Now in the code, an object has been created. In that object, the symbols have been taken as keys and an array method called replace is used.
In the replace method, 2 arguments are given, the object that has been changed and the object in which it has been changed. In the first argument, I have taken all the symbols from the regular expression, which are inside the brackets, it will search for all of them and that \g means that at the global level and the second argument is the callback function and that function returns the key of the object. You have learned one thing that how the callback function works in arrays and methods.
Congratulations on solving the challenge! You should be proud of your achievement…we are! But we are removing your working solution, so it is not available to others who have not yet done the work to get there. Again, congrats!
removed by moderator - refer to above post for the reason
console.log(convertHTML(‘Stuff in “quotation marks”’))
Yes, there was a mistake in my earlier mapping. I corrected it afterward and updated the code with the proper HTML entities. The current code is the corrected version, and that is the one I am referring to