In this breadth first traversal of a DOM, what is the purpose of visitedNodes array and how does !visitedNodes.includes(currentNode) work? What if I h
visitedNodes
!visitedNodes.includes(currentNode)