x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<h1>JavaScript values() Method</h1>
6
<p id="demo"></p>
7
8
<script>
9
    let list = document.body.childNodes;
10
    let txt = "";
11
    for (let x of list.values()) {
12
        txt += x + "<br>";
13
    }
14
    document.getElementById("demo").innerHTML = txt;
15
</script>
16
17
</body>
18
</html>