<!DOCTYPE html>
<html lang="en-US">
<body>
<p id="point">Check your console after clicking on the button to create and add comment.</p>
<button onclick="myFunction()">Click Me</button>
<script>
var x = document.getElementById("point");
function myFunction(){
var comt = document.createComment("My p Comment");
x.appendChild(comt);
console.log(x.innerHTML);
}
</script> </body>
</html>