Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body class="main classes"> <script> for(let name of document.body.classList) { alert(name); // main, and then classes } </script> </body> </html>