I want to know how to store an html tag as a Javascript object. Consider the following code:
const temp = () => {
const complexity = "O(n<sup>2</sup>)"
return (
<div>
{complexity}
</div>
)
}
Right now, it renders as the exact string: O(n<sup>2</sup>)
Instead I want the <sup> to be treated as a the html tag and render as: O(n2)
Any help is appreciated. Thanks