<!DOCTYPE html>
<html>
<style>
.myStyle {
background-color: coral;
padding: 16px;
}
.anotherClass {
text-align: center;
font-size: 25px;
}
.thirdClass {
text-transform: uppercase;
}
</style>
<body>
<h1>The DOMToken Object</h1>
<h2>The length Property</h2>
<div id="myDIV" class="myStyle anotherClass thirdClass">
<p>I am a myDIV.</p>
</div>
<p>The number of class names in myDIV are:</p>
<p id="demo"></p>
<script>
let numb = document.getElementById("myDIV").classList.length;
document.getElementById("demo").innerHTML = numb;
</script>
</body>
</html>