<html>
<body>
<h1>The DOMTokenList Object</h1>
<h2>The forEach() Method</h2>
<p>The tokens in the list are:</p>
<p id="demo" class="c1 c2 c3"></p>
<script>
let list = document.getElementById("demo").classList;
let text = "";
list.forEach(
function(token, index) {
text += "Token " + index + "= " + token + "<br>";
}
);
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>