How to check if two DOM nodes are equal in JavaScript?
Originally posted here!
To check if 2 DOM nodes are equal in JavaScript, you can use the isEqualNode() node method.
Suppose you have 2 HTML elements like this,
<div class="heading">
Hello World
</div>
<div class="heading">
Hello World
</div>
No...
melvingeorge-me.hashnode.dev2 min read