How to use DOM Element hasAttribute() method in Javascript?

How to use DOM Element hasAttribute() method in Javascript?

More to explore

Based on this image's title: “How to use DOM Element hasAttribute() method in Javascript?