JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test_comments"></div>

JavaScript

$('#test_comments').html('<!-- this is a comment -->');
alert($('#test_comments').html());