JS isEqualNode


html file

<!DOCTYPE html>
<html>
<head>
    <title>DOM Navigation</title>
</head>
<body>
    <ul id="list-1">
        <li class="abc">orange</li>
        <li>Banana</li>
        <li>Apple</li> 
        <li>Grapes</li>
    </ul>
    <ul id="list-2">
        <li>Guava</li>
        <li class="abc">orange</li>
        <li>PineApple</li> 
    </ul>
    <script src="js/dom-create.js"></script>
</body>
</html>


dom-create.js

var target1 = document.getElementById("list-1").firstElementChild;

var target2 = document.getElementById("list-2").children[1];

var equal = target1.isEqualNode(target2);

console.log(equal);