I am trying to append a html symbol code – ☀ which is a sun to an html span.innerHTML using a js function but what I get in is
<span class="condition symbol">&#x2600;</span>
And in this way it shows ☀ instead of the sun symbol.
I tried using “, ”,”” while appending the symbol’s code but same.
const htmlElement=document.createElement('span');
... //adding the classes
htmlElement.textContent='☀';