How to Get Class Names of an HTML Element as String in JavaScript?

How to Get Class Names of an HTML Element as String in JavaScript?

More to explore

Based on this image's title: “How to Get Class Names of an HTML Element as String in JavaScript?