<html>
<body>
<!-- This is a comment node! -->
<h1>The Element Object</h1>
<h2>The values() Method</h2>
<p>Whitespace between elements are text nodes. Comments are also nodes.</p>
<p>The body element's child nodes are:</p>
<p id="demo"></p>
<script>
const list = document.body.childNodes;
let text = "";
for (let x of list.values()) {
text += x + "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>