I am developing a web application. In my javascript I have my code like this:
var x = '<p> This is a paragraph</p> <h1> Heading</h1> ";
I want to convert this into proper html text like this:
<p> This is a paragraph</p> <h1> Heading</h1>
Is there any javascript function for doing that so that when I console log it, it appears as proper html text?
Any suggestions will be highly appreciated.