<pre class="a b c"></pre>DOMTokenList: forEach() method / notebook
DOMTokenList: forEach() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const pre = document.querySelector("pre");
const classes = pre.classList;
const iterator = classes.values();
classes.forEach(function (value, key, listObj) {
pre.textContent += `(${value} ${key})/${this}\n`;
}, "arg");